changeset 2751:3247049dfc7a libavcodec

fix segfault if flush is called before the first frame (I think that's it, and this fixes it)
author mru
date Wed, 01 Jun 2005 12:03:25 +0000
parents 704c284c827a
children 23665209e823
files h264.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Jun 01 11:56:58 2005 +0000
+++ b/h264.c	Wed Jun 01 12:03:25 2005 +0000
@@ -3505,7 +3505,8 @@
         h->delayed_pic[i]= NULL;
     h->delayed_output_pic= NULL;
     idr(h);
-    h->s.current_picture_ptr->reference= 0;
+    if(h->s.current_picture_ptr)
+        h->s.current_picture_ptr->reference= 0;
 }
 
 /**