changeset 2937:e63bbb945ebd libavcodec

fix a crash on seeking to an invalid frame
author lorenm
date Thu, 10 Nov 2005 04:40:49 +0000
parents 0c8eec04b26c
children 363be7734674
files h264.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
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 //?