[FFmpeg-devel] [PATCH] fftools/ffmpeg_enc: Prevent duplicate A53 Closed Captions at frame rate up-conversion

Artem Smorodin artem.smorodin at telestream.net
Fri Jun 9 16:19:27 EEST 2023


When up-converting frame rate, ffmpeg duplicates frames including side data. This causes duplicated characters in the output. This patch removes A53 side data from duplicated frames.

Signed-off-by: Artem Smorodin <artem.smorodin at telestream.net>
---
 fftools/ffmpeg_enc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 2bf4782a9f..93d18034ca 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -1104,6 +1104,9 @@ static void do_video_out(OutputFile *of, OutputStream *ost, AVFrame *frame)
         else if (ret < 0)
             exit_program(1);
 
+        //Prevent duplicate Closed Captions at frame rate up-conversion
+        av_frame_remove_side_data(in_picture, AV_FRAME_DATA_A53_CC);
+
         e->next_pts++;
         e->vsync_frame_number++;
     }
-- 
2.25.1

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.


More information about the ffmpeg-devel mailing list