comparison mpegvideo.c @ 7922:ed0ebbb168b6 libavcodec

Do not use the generic "alloc missing references" code for h.264 as it does not work correctly in that case. Fixes issue652.
author michael
date Thu, 25 Sep 2008 14:34:14 +0000
parents 8195c970d077
children 2b20ad98e424
comparison
equal deleted inserted replaced
7921:44570b9b3aa1 7922:ed0ebbb168b6
892 s->pict_type, s->dropable);*/ 892 s->pict_type, s->dropable);*/
893 893
894 if(s->last_picture_ptr) copy_picture(&s->last_picture, s->last_picture_ptr); 894 if(s->last_picture_ptr) copy_picture(&s->last_picture, s->last_picture_ptr);
895 if(s->next_picture_ptr) copy_picture(&s->next_picture, s->next_picture_ptr); 895 if(s->next_picture_ptr) copy_picture(&s->next_picture, s->next_picture_ptr);
896 896
897 if(s->pict_type != FF_I_TYPE && (s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && !s->dropable){ 897 if(s->pict_type != FF_I_TYPE && (s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && !s->dropable && s->codec_id != CODEC_ID_H264){
898 av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n"); 898 av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
899 assert(s->pict_type != FF_B_TYPE); //these should have been dropped if we don't have a reference 899 assert(s->pict_type != FF_B_TYPE); //these should have been dropped if we don't have a reference
900 goto alloc; 900 goto alloc;
901 } 901 }
902 902