From 3de5fd4342fae40e43c8b0574b3e2e2dbe9d13d1 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 27 Oct 2017 09:51:29 +0200 Subject: [PATCH] gst-play: Prevent disabling all streams This would have bad effects :) --- tools/gst-play.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/gst-play.c b/tools/gst-play.c index fcca5b7dec..70c9c6bc5b 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -1259,8 +1259,11 @@ play_cycle_track_selection (GstPlay * play, GstPlayTrackType track_type) g_mutex_unlock (&play->selection_lock); if (play->is_playbin3) { - gst_element_send_event (play->playbin, - gst_event_new_select_streams (selected_streams)); + if (selected_streams) + gst_element_send_event (play->playbin, + gst_event_new_select_streams (selected_streams)); + else + g_print ("Can't disable all streams !\n"); } else { g_object_set (play->playbin, prop_cur, cur, NULL); }