diff h264.c @ 2937:e63bbb945ebd libavcodec

fix a crash on seeking to an invalid frame
author lorenm
date Thu, 10 Nov 2005 04:40:49 +0000
parents b564bb15e63c
children be87ff950242
line wrap: on
line diff
--- a/h264.c	Wed Nov 09 19:18:20 2005 +0000
+++ b/h264.c	Thu Nov 10 04:40:49 2005 +0000
@@ -7731,10 +7731,13 @@
         h->delayed_output_pic = out;
 #endif
 
-        *pict= *(AVFrame*)out;
-    }
-
-    assert(pict->data[0]);
+        if(out)
+            *pict= *(AVFrame*)out;
+        else
+            av_log(avctx, AV_LOG_DEBUG, "no picture\n");
+    }
+
+    assert(pict->data[0] || !*data_size);
     ff_print_debug_info(s, pict);
 //printf("out %d\n", (int)pict->data[0]);
 #if 0 //?