mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-03 18:31:28 +00:00
gstplay: support disabling the selected track at startup
In some cases, need to disable some type tracks at startup before receiving the stream collection message. And fix printing error log in this case. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8568>
This commit is contained in:
parent
970bfc335e
commit
4b44169f05
1 changed files with 4 additions and 1 deletions
|
@ -1773,7 +1773,7 @@ stream_collection_cb (G_GNUC_UNUSED GstBus * bus, GstMessage * msg,
|
|||
return;
|
||||
|
||||
g_mutex_lock (&self->lock);
|
||||
do_default_selection = self->collection != NULL;
|
||||
do_default_selection = self->collection == NULL;
|
||||
updated = update_stream_collection (self, collection);
|
||||
gst_object_unref (collection);
|
||||
|
||||
|
@ -3447,6 +3447,9 @@ gst_play_select_streams (GstPlay * self)
|
|||
GList *stream_list = NULL;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
if (!self->collection)
|
||||
return FALSE;
|
||||
|
||||
if (self->audio_sid && self->audio_enabled)
|
||||
stream_list = g_list_append (stream_list, g_strdup (self->audio_sid));
|
||||
if (self->video_sid && self->video_enabled)
|
||||
|
|
Loading…
Reference in a new issue