[FFmpeg-cvslog] r13838 - in trunk/libavformat: asf.c avidec.c mov.c mpegts.c utils.c

bcoudurier subversion
Fri Jun 20 19:22:56 CEST 2008


Author: bcoudurier
Date: Fri Jun 20 19:22:56 2008
New Revision: 13838

Log:
uniformize AVStream->priv_data freeing in av_close_input_stream

Modified:
   trunk/libavformat/asf.c
   trunk/libavformat/avidec.c
   trunk/libavformat/mov.c
   trunk/libavformat/mpegts.c
   trunk/libavformat/utils.c

Modified: trunk/libavformat/asf.c
==============================================================================
--- trunk/libavformat/asf.c	(original)
+++ trunk/libavformat/asf.c	Fri Jun 20 19:22:56 2008
@@ -925,7 +925,6 @@ static int asf_read_close(AVFormatContex
     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;

Modified: trunk/libavformat/avidec.c
==============================================================================
--- trunk/libavformat/avidec.c	(original)
+++ trunk/libavformat/avidec.c	Fri Jun 20 19:22:56 2008
@@ -1060,8 +1060,6 @@ static int avi_read_close(AVFormatContex
 
     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);
     }
 

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Fri Jun 20 19:22:56 2008
@@ -1899,7 +1899,6 @@ static int mov_read_close(AVFormatContex
         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++){

Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c	(original)
+++ trunk/libavformat/mpegts.c	Fri Jun 20 19:22:56 2008
@@ -334,8 +334,6 @@ static void mpegts_close_filter(MpegTSCo
     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;

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Fri Jun 20 19:22:56 2008
@@ -2203,6 +2203,7 @@ void av_close_input_stream(AVFormatConte
         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--) {




More information about the ffmpeg-cvslog mailing list