[FFmpeg-cvslog] Revert "lavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer"
Aman Gupta
git at videolan.org
Sat Jan 9 12:33:35 CET 2016
ffmpeg | branch: master | Aman Gupta <aman at tmm1.net> | Fri Jan 8 17:40:04 2016 -0800| [23a50c8ab9fba5fe4310337db21d6c7eeb089323] | committer: Clément Bœsch
Revert "lavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer"
This reverts commit fe225b113b0553cdcf1a1d2fbdbe37c467d7951b.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23a50c8ab9fba5fe4310337db21d6c7eeb089323
---
libavcodec/ccaption_dec.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 517e2c0..02bce01 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -361,15 +361,17 @@ static void handle_pac(CCaptionSubContext *ctx, uint8_t hi, uint8_t lo)
}
}
-static void handle_erase(CCaptionSubContext *ctx, int n_screen)
+static void handle_erase(CCaptionSubContext *ctx, int64_t pts, 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)
{
- reap_screen(ctx, pts);
+ handle_erase(ctx, pts, ctx->active_screen);
ctx->active_screen = !ctx->active_screen;
ctx->cursor_column = 0;
}
@@ -450,7 +452,7 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint
break;
case 0x2c:
/* erase display memory */
- handle_erase(ctx, ctx->active_screen);
+ handle_erase(ctx, pts, ctx->active_screen);
break;
case 0x2d:
/* carriage return */
@@ -461,7 +463,7 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint
break;
case 0x2e:
/* erase non displayed memory */
- handle_erase(ctx, !ctx->active_screen);
+ handle_erase(ctx, pts, !ctx->active_screen);
break;
case 0x2f:
/* end of caption */
More information about the ffmpeg-cvslog
mailing list