Mercurial > libavcodec.hg
changeset 825:92c6d8b71e3b libavcodec
handle init error in ffmpeg12
author | arpi_esp |
---|---|
date | Sat, 02 Nov 2002 01:43:19 +0000 |
parents | 371ef113d984 |
children | ce240888252d |
files | mpeg12.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mpeg12.c Sat Nov 02 00:05:06 2002 +0000 +++ b/mpeg12.c Sat Nov 02 01:43:19 2002 +0000 @@ -1582,7 +1582,7 @@ 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 @@ } *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;