diff options
author | Arpi <arpi@thot.banki.hu> | 2002-11-02 01:43:19 +0000 |
---|---|---|
committer | Arpi <arpi@thot.banki.hu> | 2002-11-02 01:43:19 +0000 |
commit | 288daa8452c7c5191bf28d93a84cb70fa9f10d66 (patch) | |
tree | 3977832b5a6dbb0086f06ac95a5dcda6a325753f | |
parent | 80663785f7a7cf1f7e328d26467a424b52a495da (diff) | |
download | ffmpeg-288daa8452c7c5191bf28d93a84cb70fa9f10d66.tar.gz |
handle init error in ffmpeg12
Originally committed as revision 1141 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpeg12.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 7201e541c7..8cf31b5158 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1582,7 +1582,7 @@ static int mpeg_decode_slice(AVCodecContext *avctx, if (s->first_slice) { s->first_slice = 0; if(MPV_frame_start(s, avctx) < 0) - return -1; + return -2; } init_get_bits(&s->gb, buf, buf_size); @@ -1928,8 +1928,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx, } *data_size = sizeof(AVPicture); goto the_end; - }else if(ret==-1){ + }else if(ret<0){ printf("Error while decoding slice\n"); + if(ret<-1) return -1; } } break; |