avcodec/ccaption_dec: switch active screen in end of caption early

Fixes dropping of last caption.
pull/340/head
Paul B Mahol 5 years ago
parent 847d0b99de
commit 0c2623d3aa
  1. 3
      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

Loading…
Cancel
Save