From 65e071c1c86c87721e9c1aee7034678aa73433b1 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 21 Sep 2020 16:48:38 +0200 Subject: [PATCH] flvmux: Mux timestampless buffers immediately Instead of leaving them queued indefinitely, or until we're timing out and it's the only buffer queued. Part-of: --- subprojects/gst-plugins-good/gst/flv/gstflvmux.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c index c94ffd4733..a77e1de0d7 100644 --- a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c +++ b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c @@ -1994,12 +1994,16 @@ gst_flv_mux_find_best_pad (GstAggregator * aggregator, GstClockTime * ts, break; } - if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS_OR_PTS (buffer))) { - t = gst_flv_mux_segment_to_running_time (&apad->segment, - GST_BUFFER_DTS_OR_PTS (buffer)); - } + t = gst_flv_mux_segment_to_running_time (&apad->segment, + GST_BUFFER_DTS_OR_PTS (buffer)); - if (!GST_CLOCK_TIME_IS_VALID (best_ts) || + if (!GST_CLOCK_TIME_IS_VALID (t)) { + GST_WARNING_OBJECT (apad, "Buffer has no timestamp: %" GST_PTR_FORMAT, + buffer); + gst_object_replace ((GstObject **) & best, GST_OBJECT (apad)); + best_ts = GST_CLOCK_TIME_NONE; + done = TRUE; + } else if (!GST_CLOCK_TIME_IS_VALID (best_ts) || (GST_CLOCK_TIME_IS_VALID (t) && t < best_ts)) { gst_object_replace ((GstObject **) & best, GST_OBJECT (apad)); best_ts = t;