changeset 1120:801d4a5cf353 libavformat

free codec extradata in av_close_input_file
author mru
date Fri, 16 Jun 2006 07:54:37 +0000
parents 6ea3cf7eaba9
children 787a70a8b867
files asf.c avidec.c matroska.c nsvdec.c nut.c ogg.c ogg2.c smacker.c utils.c
diffstat 9 files changed, 1 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/asf.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/asf.c	Fri Jun 16 07:54:37 2006 +0000
@@ -730,7 +730,6 @@
     for(i=0;i<s->nb_streams;i++) {
         AVStream *st = s->streams[i];
         av_free(st->priv_data);
-        av_free(st->codec->extradata);
     av_free(st->codec->palctrl);
     }
     return 0;
--- a/avidec.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/avidec.c	Fri Jun 16 07:54:37 2006 +0000
@@ -898,7 +898,6 @@
         AVStream *st = s->streams[i];
         AVIStream *ast = st->priv_data;
         av_free(ast);
-        av_free(st->codec->extradata);
         av_free(st->codec->palctrl);
     }
 
--- a/matroska.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/matroska.c	Fri Jun 16 07:54:37 2006 +0000
@@ -2630,10 +2630,6 @@
         av_free(track);
     }
 
-    for (n = 0; n < s->nb_streams; n++) {
-        av_free(s->streams[n]->codec->extradata);
-    }
-
     memset(matroska, 0, sizeof(MatroskaDemuxContext));
 
     return 0;
--- a/nsvdec.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/nsvdec.c	Fri Jun 16 07:54:37 2006 +0000
@@ -705,7 +705,6 @@
             av_free(ast->index_entries);
             av_free(ast);
         }
-        av_free(st->codec->extradata);
         av_free(st->codec->palctrl);
     }
 
--- a/nut.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/nut.c	Fri Jun 16 07:54:37 2006 +0000
@@ -1415,9 +1415,6 @@
     NUTContext *nut = s->priv_data;
     int i;
 
-    for(i=0;i<s->nb_streams;i++) {
-        av_freep(&s->streams[i]->codec->extradata);
-    }
     av_freep(&nut->stream);
 
     return 0;
--- a/ogg.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/ogg.c	Fri Jun 16 07:54:37 2006 +0000
@@ -249,7 +249,6 @@
 
     ogg_stream_clear(&context->os) ;
     ogg_sync_clear(&context->oy) ;
-    av_freep(&avfcontext->streams[0]->codec.extradata);
 
     return 0 ;
 }
--- a/ogg2.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/ogg2.c	Fri Jun 16 07:54:37 2006 +0000
@@ -542,7 +542,6 @@
     for (i = 0; i < ogg->nstreams; i++){
         av_free (ogg->streams[i].buf);
         av_free (ogg->streams[i].private);
-        av_freep (&s->streams[i]->codec->extradata);
     }
     av_free (ogg->streams);
     return 0;
--- a/smacker.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/smacker.c	Fri Jun 16 07:54:37 2006 +0000
@@ -329,11 +329,6 @@
     if(smk->frm_flags)
         av_free(smk->frm_flags);
 
-    for(i=0;i<s->nb_streams;i++) {
-        AVStream *st = s->streams[i];
-        if(st->codec->extradata)
-            av_free(st->codec->extradata);
-    }
     return 0;
 }
 
--- a/utils.c	Thu Jun 15 23:26:48 2006 +0000
+++ b/utils.c	Fri Jun 16 07:54:37 2006 +0000
@@ -2167,6 +2167,7 @@
             av_parser_close(st->parser);
         }
         av_free(st->index_entries);
+        av_free(st->codec->extradata);
         av_free(st->codec);
         av_free(st);
     }