diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-07-17 17:50:42 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-07-17 17:50:42 +0000 |
commit | 9022797ba2acfeb71191b77382e41ef5b6b910cc (patch) | |
tree | d6ee86147da970a51da6afa8cfe16dc18741811b /libavcodec/mpegvideo.c | |
parent | 9ac7ecd698ef003f4e1165f309d76ec6ea1b7159 (diff) | |
download | ffmpeg-9022797ba2acfeb71191b77382e41ef5b6b910cc.tar.gz |
fixing NULL reference frame with dr1
Originally committed as revision 775 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 9f2cd49b06..73c83275c6 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -637,6 +637,12 @@ void MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) for(i=0;i<3;i++) { if(avctx->flags&CODEC_FLAG_DR1) s->aux_picture[i]= avctx->dr_buffer[i]; + + //FIXME the following should never be needed, the decoder should drop b frames if no reference is available + if(s->next_picture[i]==NULL) + s->next_picture[i]= s->aux_picture[i]; + if(s->last_picture[i]==NULL) + s->last_picture[i]= s->next_picture[i]; s->current_picture[i] = s->aux_picture[i]; } |