1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Aneesh Dogra 2012-01-05 00:10:01 +05:30 committed by Ronald S. Bultje
parent 893f137679
commit 4b84f68223

View File

@ -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;