changeset 9372:9bb96825fc10 libavcodec

Skip non intra frames that have no reference frames.
author michael
date Thu, 09 Apr 2009 20:13:35 +0000
parents 6de6fb68621c
children 78c2ddc32bed
files snow.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/snow.c	Thu Apr 09 19:45:10 2009 +0000
+++ b/snow.c	Thu Apr 09 20:13:35 2009 +0000
@@ -4145,6 +4145,10 @@
             if(i && s->last_picture[i-1].key_frame)
                 break;
         s->ref_frames= i;
+        if(s->ref_frames==0){
+            av_log(s->avctx,AV_LOG_ERROR, "No reference frames\n");
+            return -1;
+        }
     }
 
     s->current_picture.reference= 1;
@@ -4520,7 +4524,8 @@
 
     alloc_blocks(s);
 
-    frame_start(s);
+    if(frame_start(s) < 0)
+        return -1;
     //keyframe flag duplication mess FIXME
     if(avctx->debug&FF_DEBUG_PICT_INFO)
         av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog);