Skip to content
Snippets Groups Projects
Commit 4b84f682 authored by Aneesh Dogra's avatar Aneesh Dogra Committed by Ronald S. Bultje
Browse files

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: default avatarRonald S. Bultje <rsbultje@gmail.com>
parent 893f1376
No related branches found
No related tags found
No related merge requests found
...@@ -786,7 +786,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -786,7 +786,7 @@ static int decode_frame(AVCodecContext *avctx,
if(frame_4cc == AV_RL32("ifr2")){ if(frame_4cc == AV_RL32("ifr2")){
p->pict_type= AV_PICTURE_TYPE_I; 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; return -1;
}else if(frame_4cc == AV_RL32("ifrm")){ }else if(frame_4cc == AV_RL32("ifrm")){
p->pict_type= AV_PICTURE_TYPE_I; p->pict_type= AV_PICTURE_TYPE_I;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment