From: Reimar Döffinger Date: Sat, 23 Jan 2010 15:22:48 +0000 (+0000) Subject: Use AVPALETTE_COUNT instead of hard-coding 256. X-Git-Tag: v0.6~1713 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87ac0c0a39268654c8a6ae4b3acb7a01f9d942bb;p=platform%2Fupstream%2Flibav.git Use AVPALETTE_COUNT instead of hard-coding 256. This is consistent with other codecs and will also avoid a crash on the memcpy to data[1] if AVPALETTE_SIZE ever increases. Originally committed as revision 21399 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/vb.c b/libavcodec/vb.c index 155cceb..4dfac43 100644 --- a/libavcodec/vb.c +++ b/libavcodec/vb.c @@ -43,7 +43,7 @@ typedef struct VBDecContext { AVFrame pic; uint8_t *frame, *prev_frame; - uint32_t pal[256]; + uint32_t pal[AVPALETTE_COUNT]; const uint8_t *stream; } VBDecContext;