summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2016-01-08 17:40:11 -0800
committerClément Bœsch <u@pkh.me>2016-01-09 11:53:40 +0100
commit578b911b5ee14d68c281526a7f317a3a877ab9c0 (patch)
treeaf08012b66cddda4a8b4724e10c87bd897b5c6a7 /libavcodec
parent23a50c8ab9fba5fe4310337db21d6c7eeb089323 (diff)
Revert "lavc/ccaption_dec: implement "erase non displayed memory""
This reverts commit 26abdd61a39735c7907297e9b5c8bfe5255be555.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ccaption_dec.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 02bce01e2d..bfdf511bfc 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -361,9 +361,12 @@ static void handle_pac(CCaptionSubContext *ctx, uint8_t hi, uint8_t lo)
}
}
-static void handle_erase(CCaptionSubContext *ctx, int64_t pts, int n_screen)
+/**
+ * @param pts it is required to set end time
+ */
+static void handle_edm(CCaptionSubContext *ctx, int64_t pts)
{
- struct Screen *screen = ctx->screen + n_screen;
+ struct Screen *screen = ctx->screen + ctx->active_screen;
reap_screen(ctx, pts);
screen->row_used = 0;
@@ -371,7 +374,7 @@ static void handle_erase(CCaptionSubContext *ctx, int64_t pts, int n_screen)
static void handle_eoc(CCaptionSubContext *ctx, int64_t pts)
{
- handle_erase(ctx, pts, ctx->active_screen);
+ handle_edm(ctx,pts);
ctx->active_screen = !ctx->active_screen;
ctx->cursor_column = 0;
}
@@ -452,7 +455,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_edm(ctx, pts);
break;
case 0x2d:
/* carriage return */
@@ -461,10 +464,6 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint
roll_up(ctx);
ctx->cursor_column = 0;
break;
- case 0x2e:
- /* erase non displayed memory */
- handle_erase(ctx, pts, !ctx->active_screen);
- break;
case 0x2f:
/* end of caption */
ff_dlog(ctx, "handle_eoc\n");