Commit a662fcb6 authored by arpi_esp's avatar arpi_esp

handle init error in ffmpeg12


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1141 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9ccbf4a5
...@@ -1582,7 +1582,7 @@ static int mpeg_decode_slice(AVCodecContext *avctx, ...@@ -1582,7 +1582,7 @@ static int mpeg_decode_slice(AVCodecContext *avctx,
if (s->first_slice) { if (s->first_slice) {
s->first_slice = 0; s->first_slice = 0;
if(MPV_frame_start(s, avctx) < 0) if(MPV_frame_start(s, avctx) < 0)
return -1; return -2;
} }
init_get_bits(&s->gb, buf, buf_size); init_get_bits(&s->gb, buf, buf_size);
...@@ -1928,8 +1928,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx, ...@@ -1928,8 +1928,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
} }
*data_size = sizeof(AVPicture); *data_size = sizeof(AVPicture);
goto the_end; goto the_end;
}else if(ret==-1){ }else if(ret<0){
printf("Error while decoding slice\n"); printf("Error while decoding slice\n");
if(ret<-1) return -1;
} }
} }
break; break;
......
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