From a9ac937be5c33c517d2fc0f365c3d083a3722bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 21 Apr 2018 11:00:58 +0100 Subject: [PATCH] testsrcbin: fix bug setting stream flags We would mark all streams with FLAG_UNSELECT as we would check the pointer for non-NULLness not the dereferenced stream number (and the pointer is always non-NULL). The intention here was presumably to mark the first stream of each type as SELECT and the others as UNSELECT by default. CID 1434970. --- gst/debugutils/gsttestsrcbin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/debugutils/gsttestsrcbin.c b/gst/debugutils/gsttestsrcbin.c index 4d7f70bd72..855ca02008 100644 --- a/gst/debugutils/gsttestsrcbin.c +++ b/gst/debugutils/gsttestsrcbin.c @@ -205,7 +205,7 @@ gst_test_src_bin_setup_src (GstTestSrcBin * self, const gchar * srcfactory, gchar *stream_id = g_strdup_printf ("%s_stream_%d", srcfactory, *n_stream); gchar *pad_name = g_strdup_printf (template->name_template, *n_stream); GstStream *stream = gst_stream_new (stream_id, NULL, stype, - n_stream ? GST_STREAM_FLAG_UNSELECT : GST_STREAM_FLAG_SELECT); + (*n_stream == 0) ? GST_STREAM_FLAG_SELECT : GST_STREAM_FLAG_UNSELECT); GstEvent *stream_start = gst_event_new_stream_start (gst_stream_get_stream_id (stream));