changeset 3487:2f191d610db9 libavformat

uniformize AVStream->priv_data freeing in av_close_input_stream
author bcoudurier
date Fri, 20 Jun 2008 17:22:56 +0000
parents f68fcc8b8e9e
children 222810cefa11
files asf.c avidec.c mov.c mpegts.c utils.c
diffstat 5 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/asf.c	Fri Jun 20 17:16:56 2008 +0000
+++ b/asf.c	Fri Jun 20 17:22:56 2008 +0000
@@ -925,7 +925,6 @@
     asf_reset_header(s);
     for(i=0;i<s->nb_streams;i++) {
         AVStream *st = s->streams[i];
-        av_free(st->priv_data);
         av_free(st->codec->palctrl);
     }
     return 0;
--- a/avidec.c	Fri Jun 20 17:16:56 2008 +0000
+++ b/avidec.c	Fri Jun 20 17:22:56 2008 +0000
@@ -1060,8 +1060,6 @@
 
     for(i=0;i<s->nb_streams;i++) {
         AVStream *st = s->streams[i];
-        AVIStream *ast = st->priv_data;
-        av_free(ast);
         av_free(st->codec->palctrl);
     }
 
--- a/mov.c	Fri Jun 20 17:16:56 2008 +0000
+++ b/mov.c	Fri Jun 20 17:22:56 2008 +0000
@@ -1899,7 +1899,6 @@
         av_freep(&sc->drefs);
         if (sc->pb && sc->pb != s->pb)
             url_fclose(sc->pb);
-        av_freep(&sc);
     }
     if(mov->dv_demux){
         for(i=0; i<mov->dv_fctx->nb_streams; i++){
--- a/mpegts.c	Fri Jun 20 17:16:56 2008 +0000
+++ b/mpegts.c	Fri Jun 20 17:22:56 2008 +0000
@@ -334,8 +334,6 @@
     pid = filter->pid;
     if (filter->type == MPEGTS_SECTION)
         av_freep(&filter->u.section_filter.section_buf);
-    else if (filter->type == MPEGTS_PES)
-        av_freep(&filter->u.pes_filter.opaque);
 
     av_free(filter);
     ts->pids[pid] = NULL;
--- a/utils.c	Fri Jun 20 17:16:56 2008 +0000
+++ b/utils.c	Fri Jun 20 17:22:56 2008 +0000
@@ -2203,6 +2203,7 @@
         av_free(st->codec->extradata);
         av_free(st->codec);
         av_free(st->filename);
+        av_free(st->priv_data);
         av_free(st);
     }
     for(i=s->nb_programs-1; i>=0; i--) {