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.
This commit is contained in:
Tim-Philipp Müller 2018-04-21 11:00:58 +01:00
parent 9b597200f4
commit a9ac937be5

View file

@ -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));