fixing NULL reference frame with dr1

Originally committed as revision 775 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2002-07-17 17:50:42 +00:00
parent 9ac7ecd698
commit 9022797ba2

View File

@ -638,6 +638,12 @@ void MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
if(avctx->flags&CODEC_FLAG_DR1) if(avctx->flags&CODEC_FLAG_DR1)
s->aux_picture[i]= avctx->dr_buffer[i]; 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]; s->current_picture[i] = s->aux_picture[i];
} }
} else { } else {