Browse Source

lavc/ccaption_dec: clear all unused rows during rollup

Sometimes rollup captions can move around the screen. This fixes "ghost"
captions from below the current rollup area from continuing to be
captured when a rollup moves higher up on the screen.
tags/n3.0
Aman Gupta Clément Bœsch 10 years ago
parent
commit
3a0e5cfcee
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/ccaption_dec.c

+ 4
- 1
libavcodec/ccaption_dec.c View File

@@ -294,8 +294,11 @@ static void roll_up(CCaptionSubContext *ctx)
*/
keep_lines = FFMIN(ctx->cursor_row + 1, ctx->rollup);

for (i = 0; i < ctx->cursor_row - keep_lines; i++)
for (i = 0; i < SCREEN_ROWS; i++) {
if (i > ctx->cursor_row - keep_lines && i <= ctx->cursor_row)
continue;
UNSET_FLAG(screen->row_used, i);
}

for (i = 0; i < keep_lines && screen->row_used; i++) {
const int i_row = ctx->cursor_row - keep_lines + i + 1;


Loading…
Cancel
Save