summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2008-09-25 14:34:14 +0000
committerMichael Niedermayer <[email protected]>2008-09-25 14:34:14 +0000
commitfe67a236dd97a20478f1b71d255e64d202287ecc (patch)
tree66d8f1e1e732da96c7dbf3d4d7bdebf787d120ef
parent07dff5c7a421b346a23c685259eb6e88abacb5d3 (diff)
Do not use the generic "alloc missing references" code for h.264 as it does
not work correctly in that case. Fixes issue652. Originally committed as revision 15413 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index ce52a0cabc..588bb7896c 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -894,7 +894,7 @@ alloc:
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;