From bf38898af82628b7509e92d82c2b239684f5f222 Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Wed, 8 Jul 2020 18:24:06 +0300 Subject: [PATCH] cccombiner: Update segment according to video sink pad Otherwise the following pipeline would preroll after 1000 hours: gst-launch-1.0 videotestsrc ! x264enc ! cccombiner ! fakesink silent=0 sync=1 -v Fixes #1355 Part-of: --- ext/closedcaption/gstcccombiner.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/closedcaption/gstcccombiner.c b/ext/closedcaption/gstcccombiner.c index fbcf865..305cd8e 100644 --- a/ext/closedcaption/gstcccombiner.c +++ b/ext/closedcaption/gstcccombiner.c @@ -415,6 +415,15 @@ gst_cc_combiner_sink_event (GstAggregator * aggregator, break; } + case GST_EVENT_SEGMENT:{ + if (strcmp (GST_OBJECT_NAME (agg_pad), "sink") == 0) { + const GstSegment *segment; + + gst_event_parse_segment (event, &segment); + gst_aggregator_update_segment (aggregator, segment); + } + break; + } default: break; } -- 2.7.4