# HG changeset patch # User michael # Date 1222353254 0 # Node ID ed0ebbb168b6673711402349b01913a1ab6657f9 # Parent 44570b9b3aa1236b7e63125b0017fc3d22600962 Do not use the generic "alloc missing references" code for h.264 as it does not work correctly in that case. Fixes issue652. diff -r 44570b9b3aa1 -r ed0ebbb168b6 mpegvideo.c --- a/mpegvideo.c Thu Sep 25 14:29:35 2008 +0000 +++ b/mpegvideo.c Thu Sep 25 14:34:14 2008 +0000 @@ -894,7 +894,7 @@ if(s->last_picture_ptr) copy_picture(&s->last_picture, s->last_picture_ptr); if(s->next_picture_ptr) copy_picture(&s->next_picture, s->next_picture_ptr); - if(s->pict_type != FF_I_TYPE && (s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && !s->dropable){ + 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){ av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n"); assert(s->pict_type != FF_B_TYPE); //these should have been dropped if we don't have a reference goto alloc;