Browse Source

avcodec/ccaption_dec: default rollup to row 10

This ensures that captions are written towards the bottom of the screen
when tuning into mid-stream. The row will be reset on the receipt of the
next PAC command. Row 10 was chosen as it corresponds to the value of
"0" in a PAC (see row_map in handle_pac()).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2
Aman Gupta Michael Niedermayer 9 years ago
parent
commit
a49ed9e32d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/ccaption_dec.c

+ 2
- 1
libavcodec/ccaption_dec.c View File

@@ -261,6 +261,7 @@ static av_cold int init_decoder(AVCodecContext *avctx)
/* taking by default roll up to 2 */
ctx->mode = CCMODE_ROLLUP;
ctx->rollup = 2;
ctx->cursor_row = 10;
ret = ff_ass_subtitle_header(avctx, "Monospace",
ASS_DEFAULT_FONT_SIZE,
ASS_DEFAULT_COLOR,
@@ -298,7 +299,7 @@ static void flush_decoder(AVCodecContext *avctx)
ctx->prev_cmd[1] = 0;
ctx->mode = CCMODE_ROLLUP;
ctx->rollup = 2;
ctx->cursor_row = 0;
ctx->cursor_row = 10;
ctx->cursor_column = 0;
ctx->cursor_font = 0;
ctx->cursor_color = 0;


Loading…
Cancel
Save