From 1b302d01f7146eb7b14189d5a4c84d80681f4601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Oct 2024 17:39:02 +0200 Subject: [PATCH] flvmux: Consider timestamps before segment start to map to segment start Instead of mapping them to running time 0, which is wrong if e.g. the segment base is not equal to 0. Part-of: --- subprojects/gst-plugins-good/gst/flv/gstflvmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c index 338e5a52a8..b7326f2044 100644 --- a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c +++ b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c @@ -1674,9 +1674,9 @@ static GstClockTime gst_flv_mux_segment_to_running_time (const GstSegment * segment, GstClockTime t) { /* we can get a dts before the segment, if dts < pts and pts is inside - * the segment, so we consider early times as 0 */ + * the segment, so we consider early times to map to segment start */ if (t < segment->start) - return 0; + t = segment->start; return gst_segment_to_running_time (segment, GST_FORMAT_TIME, t); }