mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
msrle: fix small palette handling
Fixes second file in Ticket1273 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ac25b31ede
commit
c98d3056cf
@ -73,8 +73,8 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx)
|
||||
avcodec_get_frame_defaults(&s->frame);
|
||||
s->frame.data[0] = NULL;
|
||||
|
||||
if (avctx->extradata_size >= AVPALETTE_SIZE)
|
||||
for (i = 0; i < AVPALETTE_SIZE/4; i++)
|
||||
if (avctx->extradata_size >= 4)
|
||||
for (i = 0; i < FFMIN(avctx->extradata_size, AVPALETTE_SIZE)/4; i++)
|
||||
s->pal[i] = 0xFFU<<24 | AV_RL32(avctx->extradata+4*i);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user