diff avidec.c @ 584:4e3bab6555ae libavformat

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 <cannonball>at<bw-team>dot<com>)
author michael
date Fri, 12 Nov 2004 01:32:35 +0000
parents aca10aa7686f
children fe24632a577b
line wrap: on
line diff
--- a/avidec.c	Thu Nov 11 18:09:28 2004 +0000
+++ b/avidec.c	Fri Nov 12 01:32:35 2004 +0000
@@ -512,6 +512,8 @@
 
             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++) {