changeset 2231:c87bab25f89f libavcodec

changing size segfault fix
author michael
date Wed, 15 Sep 2004 00:35:18 +0000
parents 53f407cf1f18
children 960e3552e418
files mpegvideo.c utils.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Tue Sep 14 18:35:03 2004 +0000
+++ b/mpegvideo.c	Wed Sep 15 00:35:18 2004 +0000
@@ -860,9 +860,12 @@
     s->last_picture_ptr=
     s->next_picture_ptr=
     s->current_picture_ptr= NULL;
+    s->linesize= s->uvlinesize= 0;
 
     for(i=0; i<3; i++)
         av_freep(&s->visualization_buffer[i]);
+
+    avcodec_default_free_buffers(s->avctx);
 }
 
 #ifdef CONFIG_ENCODERS
--- a/utils.c	Tue Sep 14 18:35:03 2004 +0000
+++ b/utils.c	Wed Sep 15 00:35:18 2004 +0000
@@ -31,7 +31,7 @@
 #include <stdarg.h>
 #include <limits.h>
 
-static void avcodec_default_free_buffers(AVCodecContext *s);
+void avcodec_default_free_buffers(AVCodecContext *s);
 
 void *av_mallocz(unsigned int size)
 {
@@ -760,7 +760,7 @@
         avctx->codec->flush(avctx);
 }
 
-static void avcodec_default_free_buffers(AVCodecContext *s){
+void avcodec_default_free_buffers(AVCodecContext *s){
     int i, j;
 
     if(s->internal_buffer==NULL) return;