Commit d7499e3e authored by michael's avatar michael

check for no frame and prevent segfault


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8211 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2d5ba92e
......@@ -8355,6 +8355,11 @@ static int decode_frame(AVCodecContext *avctx,
if(buf_index < 0)
return -1;
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
av_log(avctx, AV_LOG_ERROR, "no frame!\n");
return -1;
}
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) || (s->mb_y >= s->mb_height && s->mb_height)){
Picture *out = s->current_picture_ptr;
Picture *cur = s->current_picture_ptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment