diff mpegvideo.c @ 1573:a4aa536938b8 libavcodec

segfault fix
author michael
date Sat, 25 Oct 2003 19:30:14 +0000
parents bf452704100f
children 039cb2296de2
line wrap: on
line diff
--- a/mpegvideo.c	Sat Oct 25 15:22:34 2003 +0000
+++ b/mpegvideo.c	Sat Oct 25 19:30:14 2003 +0000
@@ -585,8 +585,10 @@
     av_freep(&s->input_picture);
     av_freep(&s->reordered_input_picture);
 
-    for(i=0; i<MAX_PICTURE_COUNT; i++){
-        free_picture(s, &s->picture[i]);
+    if(s->picture){
+        for(i=0; i<MAX_PICTURE_COUNT; i++){
+            free_picture(s, &s->picture[i]);
+        }
     }
     av_freep(&s->picture);
     avcodec_default_free_buffers(s->avctx);