aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-21 02:56:11 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-21 03:30:50 +0100
commitbb629792a275f7231256be8e8a16e6f81671f36d (patch)
tree32927742d66c63f37d4dfd3bf570e6177ea4027f
parenta51d82b85c83aa0d1a8295ed44a1c835065675e7 (diff)
downloadffmpeg-bb629792a275f7231256be8e8a16e6f81671f36d.tar.gz
avformat/avienc: Fix assertion failure with 256 palette entries
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/avienc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 7480c86dd0..ca505f407a 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -693,7 +693,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
tag[2] = 'p'; tag[3] = 'c';
pc_tag = ff_start_tag(pb, tag);
avio_w8(pb, 0);
- avio_w8(pb, pal_size);
+ avio_w8(pb, pal_size & 0xFF);
avio_wl16(pb, 0); // reserved
for (i = 0; i < pal_size; i++) {
uint32_t v = AV_RL32(data + size - 4*pal_size + 4*i);