4xm: pass the correct remaining buffer size to decode_i2_frame().

frame_size is the number of bytes left in the packet, so if we are passing
buf-4 we can safely read frame_size+4 bytes.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
pull/3/head
Aneesh Dogra 13 years ago committed by Ronald S. Bultje
parent 893f137679
commit 4b84f68223
  1. 2
      libavcodec/4xm.c

@ -786,7 +786,7 @@ static int decode_frame(AVCodecContext *avctx,
if(frame_4cc == AV_RL32("ifr2")){
p->pict_type= AV_PICTURE_TYPE_I;
if(decode_i2_frame(f, buf-4, frame_size) < 0)
if(decode_i2_frame(f, buf-4, frame_size + 4) < 0)
return -1;
}else if(frame_4cc == AV_RL32("ifrm")){
p->pict_type= AV_PICTURE_TYPE_I;

Loading…
Cancel
Save