From 68200fa5659bb345c1ffe33f77949a04846dd7ae Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 25 Jul 2010 09:41:30 +0000 Subject: [PATCH] spudec.c: Slightly simplify rle decoding git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31799 b3059339-0415-0410-9bf9-f77b7e298cf2 --- spudec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spudec.c b/spudec.c index 4d26323d11..17ed1ceb0f 100644 --- a/spudec.c +++ b/spudec.c @@ -298,13 +298,12 @@ static void spudec_process_data(spudec_handle_t *this, packet_t *packet) unsigned int rle = 0; rle = get_nibble(packet); if (rle < 0x04) { - rle = (rle << 4) | get_nibble(packet); - if (rle < 0x10) { + if (rle == 0) { rle = (rle << 4) | get_nibble(packet); - if (rle < 0x040) { + if (rle < 0x04) rle = (rle << 4) | get_nibble(packet); - } } + rle = (rle << 4) | get_nibble(packet); } color = 3 - (rle & 0x3); len = rle >> 2; -- 2.11.4.GIT