ffmpeg | branch: master | Paul B Mahol <one...@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

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to