From: Vivia Nikolaidou Date: Mon, 10 Aug 2020 17:20:04 +0000 (+0300) Subject: flvmux: Return NEED_DATA when no best pad is found X-Git-Tag: 1.19.3~509^2~450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75f6ca8a11684757a4751edeae1964b24c9cbb6b;p=platform%2Fupstream%2Fgstreamer.git flvmux: Return NEED_DATA when no best pad is found Part-of: --- diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index dc06fc0..564f935 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -1959,6 +1959,12 @@ gst_flv_mux_aggregate (GstAggregator * aggregator, gboolean timeout) } best = gst_flv_mux_find_best_pad (aggregator, &ts); + if (!best) { + if (!gst_flv_mux_are_all_pads_eos (mux)) + return GST_AGGREGATOR_FLOW_NEED_DATA; + else + return GST_FLOW_OK; + } ret = gst_flv_mux_write_header (mux); if (ret != GST_FLOW_OK) { @@ -2006,6 +2012,8 @@ gst_flv_mux_aggregate (GstAggregator * aggregator, gboolean timeout) GST_STIME_FORMAT, GST_TIME_ARGS (best->pts), GST_STIME_ARGS (best->dts)); } else { + if (!gst_flv_mux_are_all_pads_eos (mux)) + return GST_AGGREGATOR_FLOW_NEED_DATA; best_time = GST_CLOCK_STIME_NONE; }