Browse Source

handle init error in ffmpeg12

Originally committed as revision 1141 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Arpi 23 years ago
parent
commit
288daa8452
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/mpeg12.c

+ 3
- 2
libavcodec/mpeg12.c View File

@@ -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;


Loading…
Cancel
Save