summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-10-27 09:51:29 +0200
committerEdward Hervey <bilboed@bilboed.com>2017-10-27 09:51:29 +0200
commit3de5fd4342fae40e43c8b0574b3e2e2dbe9d13d1 (patch)
tree4f53da2e5530b475263166db48bda8a7ba59248f /tools
parenta8e05cc9cc66bb55868d5950321d7e7f33312eca (diff)
downloadgstreamer-plugins-base-3de5fd4342fae40e43c8b0574b3e2e2dbe9d13d1.tar.gz
gst-play: Prevent disabling all streams
This would have bad effects :)
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-play.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c
index fcca5b7de..70c9c6bc5 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);
}