diff options
author | jstebbins <[email protected]> | 2014-10-30 21:16:00 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-10-30 21:16:00 +0000 |
commit | 507b213cd091dc713c30ea4792096a3ea5074256 (patch) | |
tree | c699fad8c560d7a14093dca91572b76b5c76a25c /libhb/deccc608sub.c | |
parent | e01093fa14bfe568cff46583b2da581a0afb0bb9 (diff) |
deccc608sub: fix writing outside buffer
When the rollup mode changes, check if the baserow + rollup height goes
outside the screen.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6487 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deccc608sub.c')
-rw-r--r-- | libhb/deccc608sub.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c index 93c9cda81..3c0ed14b8 100644 --- a/libhb/deccc608sub.c +++ b/libhb/deccc608sub.c @@ -1221,6 +1221,11 @@ static void handle_command(unsigned char c1, const unsigned char c2, wb->data608->current_visible_start_ms = get_last_pts(wb); break; case COM_ROLLUP2: + if (wb->data608->rollup_base_row + 1 < 2) + { + move_roll_up(wb, 1); + wb->data608->rollup_base_row = 1; + } if (wb->data608->mode==MODE_POPUP) { swap_visible_buffer(wb); @@ -1244,6 +1249,11 @@ static void handle_command(unsigned char c1, const unsigned char c2, wb->data608->cursor_row = wb->data608->rollup_base_row; break; case COM_ROLLUP3: + if (wb->data608->rollup_base_row + 1 < 3) + { + move_roll_up(wb, 2); + wb->data608->rollup_base_row = 2; + } if (wb->data608->mode==MODE_POPUP) { if (write_cc_buffer(wb)) @@ -1266,6 +1276,11 @@ static void handle_command(unsigned char c1, const unsigned char c2, wb->data608->cursor_row = wb->data608->rollup_base_row; break; case COM_ROLLUP4: + if (wb->data608->rollup_base_row + 1 < 4) + { + move_roll_up(wb, 3); + wb->data608->rollup_base_row = 3; + } if (wb->data608->mode==MODE_POPUP) { if (write_cc_buffer(wb)) |