From bed1707c9c274831173902542aaef1f8428e6331 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 19 Dec 2003 00:47:36 +0000 Subject: [PATCH] fix crash Originally committed as revision 2627 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/rv10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 08d59cf680..6e591bbde0 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -379,7 +379,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) if(s->avctx->has_b_frames){ if (get_bits(&s->gb, 1)){ av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n"); - return -1; +// return -1; } seq= get_bits(&s->gb, 15); }else @@ -537,7 +537,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, } //if(s->pict_type == P_TYPE) return 0; - if (s->mb_x == 0 && s->mb_y == 0) { + if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) { if(MPV_frame_start(s, avctx) < 0) return -1; } -- GitLab