changeset 4413:371bb9f644da libavcodec

fix inifnite loop with http://sam.zoy.org/zzuf/lol-mplayer.mpg
author michael
date Fri, 26 Jan 2007 15:26:08 +0000
parents cce4bdb0e322
children 7c42c51b1130
files mpegvideo.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Fri Jan 26 15:11:10 2007 +0000
+++ b/mpegvideo.c	Fri Jan 26 15:26:08 2007 +0000
@@ -1603,7 +1603,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 != I_TYPE && (s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL)){
+    if(s->pict_type != I_TYPE && (s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && !s->dropable){
         av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
         assert(s->pict_type != B_TYPE); //these should have been dropped if we don't have a reference
         goto alloc;