1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-17 20:34:58 +00:00

Fix M$RLE 4bit. Patch by Michael Guennewig <michaelguennewig(at)gmx(dot)de>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10452 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtognimp 2003-07-21 19:04:12 +00:00
parent a50a1eab17
commit 5f26ad53e4

View File

@ -137,10 +137,9 @@ void decode_msrle4(
else
{
// copy pixels from encoded stream
rle_code = stream_byte;
rle_code /= 2;
rle_code = ((stream_byte + 1) & (~1)) / 2;
extra_byte = rle_code & 0x01;
if ((row_ptr + pixel_ptr + rle_code * bytes_per_pixel > frame_size) ||
if ((row_ptr + pixel_ptr + stream_byte * bytes_per_pixel > frame_size) ||
(row_ptr < 0))
{
mp_msg(MSGT_DECVIDEO, MSGL_WARN,
@ -170,6 +169,8 @@ void decode_msrle4(
}
pixel_ptr += bytes_per_pixel;
if (i + 1 == rle_code && (stream_byte & 1) != 0)
break;
if (pixel_ptr >= row_dec)
break;
if (bytes_per_pixel == 2)