diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-06-13 11:57:33 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-06-13 12:02:44 +0200 |
commit | 0c2623d3aad066fa5deffae4716af463b14091ab (patch) | |
tree | 2e37a78b163e926393dc9b9353e20d742d48616f | |
parent | 847d0b99dee1c2a8d9c3e8649fee7faa424efc3e (diff) |
avcodec/ccaption_dec: switch active screen in end of caption early
Fixes dropping of last caption.
-rw-r--r-- | libavcodec/ccaption_dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |