gstplay: fix critical log when enable playbin3
authorHaihua Hu <jared.hu@nxp.com>
Thu, 20 Apr 2023 08:41:11 +0000 (16:41 +0800)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 18 May 2023 12:18:05 +0000 (13:18 +0100)
commite8b74ada7c4c16f16365415176a301dddecf58f6
tree1a7352b9535eeb903e4370338165268228889851
parentfc0ada9e63a9902dec70198be6fbf5fce742350b
gstplay: fix critical log when enable playbin3

when play rtsp stream with playbin3 enabled, there are some critical logs:

g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-video'
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-audio'
g_object_get_is_valid_property: object class 'GstPlayBin3' has no property named 'n-text'

self->collection could be NULL when READY->PAUSED if the pipeline
is live, then it will fallback to query playbin2's property,
we can call gst_play_streams_info_create_from_collection
directly, it will check self->collection internal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4666>
subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c