mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
add a check before find_frame_end call
Patch by Limin Wang % lance P lmwang A gmail P com % Original thread: date: 04/09/2007 03:54 PM subject: [Ffmpeg-devel] [PATCH] fix segment fault in h264_parse if buf_size is zero Originally committed as revision 8714 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d64b88d440
commit
3b77e48f0a
@ -8059,7 +8059,8 @@ static int h264_parse(AVCodecParserContext *s,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(next<0){
|
if(next<0 && next != END_NOT_FOUND){
|
||||||
|
assert(pc->last_index + next >= 0 );
|
||||||
find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
|
find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user