Commit bb629792 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avienc: Fix assertion failure with 256 palette entries

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a51d82b8
...@@ -693,7 +693,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -693,7 +693,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
tag[2] = 'p'; tag[3] = 'c'; tag[2] = 'p'; tag[3] = 'c';
pc_tag = ff_start_tag(pb, tag); pc_tag = ff_start_tag(pb, tag);
avio_w8(pb, 0); avio_w8(pb, 0);
avio_w8(pb, pal_size); avio_w8(pb, pal_size & 0xFF);
avio_wl16(pb, 0); // reserved avio_wl16(pb, 0); // reserved
for (i = 0; i < pal_size; i++) { for (i = 0; i < pal_size; i++) {
uint32_t v = AV_RL32(data + size - 4*pal_size + 4*i); uint32_t v = AV_RL32(data + size - 4*pal_size + 4*i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment