From e8c362ee34c63f67d85aa1b702a2120e06904e4e Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 24 Mar 2023 20:39:42 +0100 Subject: [PATCH] cea608mux: advance segment->position when outputting It is the responsibility of the subclass to advance segment->position if it wants to rely on gst_aggregator_simple_get_next_time() for timeouts in live mode. Part-of: --- subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c index d85306c2c1..8c99c01f08 100644 --- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c +++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c @@ -219,12 +219,15 @@ finish_s334_both_fields (GstCea608Mux * self) gst_util_uint64_scale_int (GST_SECOND, self->cdp_fps_entry->fps_d, self->cdp_fps_entry->fps_n); GstBuffer *output = gst_buffer_new_allocate (NULL, MAX_CDP_PACKET_LEN, NULL); + GstSegment *agg_segment = + &GST_AGGREGATOR_PAD (GST_AGGREGATOR (self)->srcpad)->segment; take_s334_both_fields (self, output); GST_BUFFER_PTS (output) = output_pts; GST_BUFFER_DURATION (output) = output_duration; GST_DEBUG_OBJECT (self, "Finishing %" GST_PTR_FORMAT, output); self->n_output_buffers += 1; + agg_segment->position = output_pts + output_duration; return gst_aggregator_finish_buffer (GST_AGGREGATOR (self), output); }