When frame doubling using yadif/bwdif closed captioning gets copied to the second frame - as a result the closed captioning text is garbage.
I've attached a very simple patch that fixes this issue. Very similar to what vf_fps.c already does around line 253. -Gabe
From 0f6d3c31842ae33eaa3d5d91600bcd80c9c0a6b9 Mon Sep 17 00:00:00 2001 From: Gabriel Blanchard <gblanch...@start.ca> Date: Sun, 13 Jan 2019 17:10:01 -0500 Subject: [PATCH 1/1] fix closed captioning when frame doubling --- libavfilter/yadif_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/yadif_common.c b/libavfilter/yadif_common.c index a10cf7a17f..fbb4289b80 100644 --- a/libavfilter/yadif_common.c +++ b/libavfilter/yadif_common.c @@ -43,6 +43,9 @@ static int return_frame(AVFilterContext *ctx, int is_second) return AVERROR(ENOMEM); av_frame_copy_props(yadif->out, yadif->cur); + // Don't copy Closed Captioning + av_frame_remove_side_data(yadif->out, AV_FRAME_DATA_A53_CC); + yadif->out->interlaced_frame = 0; if (yadif->current_field == YADIF_FIELD_BACK_END) yadif->current_field = YADIF_FIELD_END; -- 2.19.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel