[FFmpeg-devel] [PATCH 09/10] libavcodec/ccaption_dec: default to simpler POPON mode

Aman Gupta ffmpeg at tmm1.net
Wed Jan 6 08:41:41 CET 2016


From: Aman Gupta <aman at tmm1.net>

the default value does not really have any effect in normal operation,
as the mode command is repeated before every new caption. after seeking,
it makes more sense to default to POPON since that is the more common
mode.
---
 libavcodec/ccaption_dec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 3de16bf..56b2b52 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -173,9 +173,7 @@ static av_cold int init_decoder(AVCodecContext *avctx)
     CCaptionSubContext *ctx = avctx->priv_data;
 
     av_bprint_init(&ctx->buffer, 0, AV_BPRINT_SIZE_UNLIMITED);
-    /* taking by default roll up to 2 */
-    ctx->mode = CCMODE_ROLLUP;
-    ctx->rollup = 2;
+    ctx->mode = CCMODE_POPON;
     ret = ff_ass_subtitle_header_default(avctx);
     if (ret < 0) {
         return ret;
@@ -203,6 +201,7 @@ static void flush_decoder(AVCodecContext *avctx)
     ctx->screen[1].row_used = 0;
     av_bprint_clear(&ctx->buffer);
     ctx->screen_changed = 1;
+    ctx->mode = CCMODE_POPON;
 }
 
 /**
-- 
2.5.3



More information about the ffmpeg-devel mailing list