Mercurial > mplayer.hg
changeset 34778:48310248f892
Ensure that the highlight disappears when switching
from DVD menu to playback.
author | reimar |
---|---|
date | Sun, 15 Apr 2012 21:37:15 +0000 |
parents | 9b8a830767f2 |
children | e59ffa59d825 |
files | sub/spudec.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sub/spudec.c Sun Apr 15 21:02:59 2012 +0000 +++ b/sub/spudec.c Sun Apr 15 21:37:15 2012 +0000 @@ -273,11 +273,17 @@ uint8_t *src; uint16_t pal[4]; unsigned stride = (crop_w + 7) & ~7; + int ret = 1; if (crop_x > this->pal_width || crop_y > this->pal_height || crop_w > this->pal_width - crop_x || crop_h > this->pal_width - crop_y || crop_w > 0x8000 || crop_h > 0x8000 || stride * crop_h > this->image_size) { - return 0; + // this might be an actual error or just signal that + // the highlight should be removed. + this->width = 0; + this->height = 0; + ret = 0; + goto out; } for (i = 0; i < 4; ++i) { int color; @@ -304,6 +310,7 @@ this->start_row = this->pal_start_row + crop_y; spudec_cut_image(this); +out: // reset scaled image this->scaled_frame_width = 0; this->scaled_frame_height = 0;