From 81178eab42c537fd9ec987ac20615ac34353140c Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 11 Oct 2023 14:47:33 +0200 Subject: [PATCH] flvmux: set the src segment position as running time We were already converting the pad last timestamp to running time but not the segment position. This segment position is used by gst_aggregator_simple_get_next_time() to compute the waiting time when aggregating. Those waiting times were wrong in my live pipeline using the system clock, resulting in the aggregator to never wait at all. Part-of: --- subprojects/gst-plugins-good/gst/flv/gstflvmux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c index 59e39df..e4553cc 100644 --- a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c +++ b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c @@ -1654,7 +1654,9 @@ gst_flv_mux_write_buffer (GstFlvMux * mux, GstFlvMuxPad * pad, { GstBuffer *tag; GstFlowReturn ret; - GstClockTime pts = GST_BUFFER_PTS (buffer); + GstClockTime pts = + gst_flv_mux_segment_to_running_time (&GST_AGGREGATOR_PAD (pad)->segment, + GST_BUFFER_PTS (buffer)); GstClockTime duration = GST_BUFFER_DURATION (buffer); GstClockTime dts = gst_flv_mux_segment_to_running_time (&GST_AGGREGATOR_PAD (pad)->segment, -- 2.7.4