From 61c52ead7c5125824c8bd1e6b2811a66d1969376 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 12 Nov 2004 01:32:35 +0000 Subject: [PATCH] When playing ftp://ftp.mplayerhq.hu/MPlayer/samples/V-codecs/QPEG/VWbig6.avi with my decoder (should appear soon) it hadn't changed palette even there are palette change chunks in that AVI. Here is small patch to make it work (zero number of colors to change in that chunk actually means to change ALL colors). patch by (Kostya atdot) Originally committed as revision 3670 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avidec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 507375f98e..4af4a0d3ed 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -512,6 +512,8 @@ resync: first = get_byte(pb); clr = get_byte(pb); + if(!clr) /* all 256 colors used */ + clr = 256; flags = get_le16(pb); p = 4; for (k = first; k < clr + first; k++) {