Browse Source

msrle: fix small palette handling

Fixes second file in Ticket1273

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
c98d3056cf
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/msrle.c

+ 2
- 2
libavcodec/msrle.c View File

@@ -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…
Cancel
Save