[FFmpeg-cvslog] avcodec/ccaption_dec: switch active screen in end of caption early
Paul B Mahol
git at videolan.org
Sat Jun 13 13:03:49 EEST 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jun 13 11:57:33 2020 +0200| [0c2623d3aad066fa5deffae4716af463b14091ab] | committer: Paul B Mahol
avcodec/ccaption_dec: switch active screen in end of caption early
Fixes dropping of last caption.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c2623d3aad066fa5deffae4716af463b14091ab
---
libavcodec/ccaption_dec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 7a494b25a4..936e2db27f 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -603,12 +603,13 @@ static int handle_eoc(CCaptionSubContext *ctx, int64_t pts)
{
int ret;
+ ctx->active_screen = !ctx->active_screen;
+
// In buffered mode, we wait til the *next* EOC and
// reap what was already on the screen since the last EOC.
if (!ctx->real_time)
ret = handle_edm(ctx,pts);
- ctx->active_screen = !ctx->active_screen;
ctx->cursor_column = 0;
// In realtime mode, we display the buffered contents (after
More information about the ffmpeg-cvslog
mailing list