comparison 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
comparison
equal deleted inserted replaced
568:7e7a7282608c 569:395bb978b9ff
635 635
636 if (s->pict_type == B_TYPE) { 636 if (s->pict_type == B_TYPE) {
637 for(i=0;i<3;i++) { 637 for(i=0;i<3;i++) {
638 if(avctx->flags&CODEC_FLAG_DR1) 638 if(avctx->flags&CODEC_FLAG_DR1)
639 s->aux_picture[i]= avctx->dr_buffer[i]; 639 s->aux_picture[i]= avctx->dr_buffer[i];
640
641 //FIXME the following should never be needed, the decoder should drop b frames if no reference is available
642 if(s->next_picture[i]==NULL)
643 s->next_picture[i]= s->aux_picture[i];
644 if(s->last_picture[i]==NULL)
645 s->last_picture[i]= s->next_picture[i];
640 646
641 s->current_picture[i] = s->aux_picture[i]; 647 s->current_picture[i] = s->aux_picture[i];
642 } 648 }
643 } else { 649 } else {
644 for(i=0;i<3;i++) { 650 for(i=0;i<3;i++) {