From e730bdaa8e316b69fd711d943aeb0c15706815c1 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Tue, 26 Oct 2021 15:58:26 +0200 Subject: [PATCH] cccombiner: fix emission of selected-samples in one case Detected while reading the code, cccombiner must set self->current_video_buffer to NULL *after* emitting selected-samples in order for the application to get a useful return when peeking the next video sample. Part-of: --- subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c index e7f230d..f72d8a2 100644 --- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c +++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c @@ -720,10 +720,10 @@ gst_cc_combiner_collect_captions (GstCCCombiner * self, gboolean timeout) if (!caption_pad) { GST_LOG_OBJECT (self, "No caption pad, passing through video"); video_buf = self->current_video_buffer; - self->current_video_buffer = NULL; gst_aggregator_selected_samples (GST_AGGREGATOR_CAST (self), GST_BUFFER_PTS (video_buf), GST_BUFFER_DTS (video_buf), GST_BUFFER_DURATION (video_buf), NULL); + self->current_video_buffer = NULL; goto done; } -- 2.7.4