diff mbox

[FFmpeg-devel] Avoid duplicating Closed Captions when increasing frame rate

Message ID CAB0OVGrrqtatYBLmDtnbgmYZCZxNV+VeG_K=WXpn+9p9f3vXtA@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Nov. 23, 2018, 6:03 p.m. UTC
Hi!

Attached patches fix Closed Captions when increasing frame rate, both
with "-r" and the fps filter, fixes ticket #7506.

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos Nov. 27, 2018, 5:41 p.m. UTC | #1
2018-11-23 19:03 GMT+01:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patches fix Closed Captions when increasing frame rate, both
> with "-r" and the fps filter, fixes ticket #7506.

Patches applied.

Carl Eugen
Paul B Mahol Oct. 29, 2019, 1:10 p.m. UTC | #2
On 11/27/18, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 2018-11-23 19:03 GMT+01:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>
>> Attached patches fix Closed Captions when increasing frame rate, both
>> with "-r" and the fps filter, fixes ticket #7506.
>
> Patches applied.
>

Please revert your incorrect change.

You clone frame but do not remove captions from cloned frame but from
original frame.
This is incorrect.

> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
diff mbox

Patch

From 86ddd7f86991bdfe865f4180f8bf5779383f5295 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Fri, 23 Nov 2018 18:49:27 +0100
Subject: [PATCH 2/2] ffmpeg: Avoid duplicating Closed Captions when
 increasing frame rate.

Fixes ticket #7506.
---
 fftools/ffmpeg.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index a12208c..6ce1156 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1286,6 +1286,8 @@  static void do_video_out(OutputFile *of,
         ret = avcodec_send_frame(enc, in_picture);
         if (ret < 0)
             goto error;
+        // Make sure Closed Captions will not be duplicated
+        av_frame_remove_side_data(in_picture, AV_FRAME_DATA_A53_CC);
 
         while (1) {
             ret = avcodec_receive_packet(enc, &pkt);
-- 
1.7.10.4