Mercurial > libavcodec.hg
diff mpegvideo.c @ 569:395bb978b9ff libavcodec
fixing NULL reference frame with dr1
author | michaelni |
---|---|
date | Wed, 17 Jul 2002 17:50:42 +0000 |
parents | 5a6eaaa9fba2 |
children | 274d9c5a75ee |
line wrap: on
line diff
--- a/mpegvideo.c Wed Jul 17 15:54:56 2002 +0000 +++ b/mpegvideo.c Wed Jul 17 17:50:42 2002 +0000 @@ -637,6 +637,12 @@ 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]; }