[FFmpeg-devel] [PATCH v2 4/9] lavc/ccaption_dec: default rollup to row 10

Anshul anshul.ffmpeg at gmail.com
Wed Jan 13 09:55:06 CET 2016



On 13 January 2016 7:12:55 AM IST, Aman Gupta <ffmpeg at tmm1.net> wrote:
>From: Aman Gupta <aman at tmm1.net>
>
>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()).
>---
> 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 6bdd754..8c913fe 100644
>--- a/libavcodec/ccaption_dec.c
>+++ b/libavcodec/ccaption_dec.c
>@@ -148,6 +148,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,
>@@ -185,7 +186,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;


How do you test that rows are captured correctly in ass format?
And subs are actually placed acc to row.


-Anshul


More information about the ffmpeg-devel mailing list