diff options
author | Aman Gupta <aman@tmm1.net> | 2016-01-06 02:06:02 +0300 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-01-08 22:39:55 +0300 |
commit | fe225b113b0553cdcf1a1d2fbdbe37c467d7951b (patch) | |
tree | 4165aff376a44788a19a69d57c1baaa19209202d /libavcodec/ccaption_dec.c | |
parent | e990d746d051173ae1a5f9a5256c0c93cc4ef21c (diff) |
lavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer
Diffstat (limited to 'libavcodec/ccaption_dec.c')
-rw-r--r-- | libavcodec/ccaption_dec.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index 02bce01e2d..517e2c0319 100644 --- a/libavcodec/ccaption_dec.c +++ b/libavcodec/ccaption_dec.c @@ -361,17 +361,15 @@ static void handle_pac(CCaptionSubContext *ctx, uint8_t hi, uint8_t lo) } } -static void handle_erase(CCaptionSubContext *ctx, int64_t pts, int n_screen) +static void handle_erase(CCaptionSubContext *ctx, int n_screen) { struct Screen *screen = ctx->screen + n_screen; - - reap_screen(ctx, pts); screen->row_used = 0; } static void handle_eoc(CCaptionSubContext *ctx, int64_t pts) { - handle_erase(ctx, pts, ctx->active_screen); + reap_screen(ctx, pts); ctx->active_screen = !ctx->active_screen; ctx->cursor_column = 0; } @@ -452,7 +450,7 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint break; case 0x2c: /* erase display memory */ - handle_erase(ctx, pts, ctx->active_screen); + handle_erase(ctx, ctx->active_screen); break; case 0x2d: /* carriage return */ @@ -463,7 +461,7 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint break; case 0x2e: /* erase non displayed memory */ - handle_erase(ctx, pts, !ctx->active_screen); + handle_erase(ctx, !ctx->active_screen); break; case 0x2f: /* end of caption */ |