[FFmpeg-cvslog] ico: consider IconEntry.NumColors of 255 to be ambiguous
Peter Ross
git at videolan.org
Thu Jan 12 16:35:03 CET 2012
ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Thu Jan 12 23:41:38 2012 +1100| [bd3a12d68db6b6ce224736d9210541b5b8907852] | committer: Michael Niedermayer
ico: consider IconEntry.NumColors of 255 to be ambiguous
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd3a12d68db6b6ce224736d9210541b5b8907852
---
libavformat/icodec.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index e539b02..214d477 100644
--- a/libavformat/icodec.c
+++ b/libavformat/icodec.c
@@ -76,6 +76,8 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->width = avio_r8(pb);
st->codec->height = avio_r8(pb);
ico->images[i].nb_pal = avio_r8(pb);
+ if (ico->images[i].nb_pal == 255)
+ ico->images[i].nb_pal = 0;
avio_skip(pb, 3);
st->codec->bits_per_coded_sample = avio_rl16(pb);
More information about the ffmpeg-cvslog
mailing list