From: Thibault Saunier Date: Thu, 19 Nov 2020 21:39:33 +0000 (-0300) Subject: transcodebin: Add filter as soon as it is set X-Git-Tag: 1.19.3~507^2~993 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=878a1960808d7c4d3c99f6dd3116476ae7e7aef5;p=platform%2Fupstream%2Fgstreamer.git transcodebin: Add filter as soon as it is set Instead of waiting so that we can simply use a clocksync element as filter, otherwise we won't know the pipeline is live as it won't return NO_PREROLL as one would expect in that case. Adding it right away shouldn't create any issue, both ways are fine. --- diff --git a/gst/transcode/gsttranscodebin.c b/gst/transcode/gsttranscodebin.c index b6df25d..778992f 100644 --- a/gst/transcode/gsttranscodebin.c +++ b/gst/transcode/gsttranscodebin.c @@ -211,7 +211,7 @@ _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad, return pad; } - gst_bin_add_many (GST_BIN (self), convert, gst_object_ref (filter), NULL); + gst_bin_add_many (GST_BIN (self), convert, NULL); convert_sink = gst_element_get_static_pad (convert, "sink"); g_assert (convert_sink); @@ -836,6 +836,8 @@ _set_filter (GstTranscodeBin * self, GstElement * filter, GstElement ** mfilter) goto bail_out; } GST_OBJECT_UNLOCK (filter); + + gst_bin_add (GST_BIN (self), gst_object_ref (filter)); } GST_OBJECT_LOCK (self);