aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-06-16 07:54:37 +0000
committerMåns Rullgård <mans@mansr.com>2006-06-16 07:54:37 +0000
commita5e9102b4b2c853a75fb46a97968e26e1d8064a3 (patch)
tree1c6484af45517b9cc4b6d673ad68808b34556ac2
parent47dd81c75fb6e7c724bf7bcc147fd931e3b81ee2 (diff)
downloadffmpeg-a5e9102b4b2c853a75fb46a97968e26e1d8064a3.tar.gz
free codec extradata in av_close_input_file
Originally committed as revision 5484 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/asf.c1
-rw-r--r--libavformat/avidec.c1
-rw-r--r--libavformat/matroska.c4
-rw-r--r--libavformat/nsvdec.c1
-rw-r--r--libavformat/nut.c3
-rw-r--r--libavformat/ogg.c1
-rw-r--r--libavformat/ogg2.c1
-rw-r--r--libavformat/smacker.c5
-rw-r--r--libavformat/utils.c1
9 files changed, 1 insertions, 17 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c
index f4a920d3e7..fd0da6ed3a 100644
--- a/libavformat/asf.c
+++ b/libavformat/asf.c
@@ -730,7 +730,6 @@ static int asf_read_close(AVFormatContext *s)
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;
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 85e819c9b6..134652f3b0 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -898,7 +898,6 @@ static int avi_read_close(AVFormatContext *s)
AVStream *st = s->streams[i];
AVIStream *ast = st->priv_data;
av_free(ast);
- av_free(st->codec->extradata);
av_free(st->codec->palctrl);
}
diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index b7e3a711e3..9a1a69bc5a 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -2630,10 +2630,6 @@ matroska_read_close (AVFormatContext *s)
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;
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 162f4d1210..32afbc4114 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -705,7 +705,6 @@ static int nsv_read_close(AVFormatContext *s)
av_free(ast->index_entries);
av_free(ast);
}
- av_free(st->codec->extradata);
av_free(st->codec->palctrl);
}
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 9c12e76f17..616eba1eec 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -1415,9 +1415,6 @@ static int nut_read_close(AVFormatContext *s)
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;
diff --git a/libavformat/ogg.c b/libavformat/ogg.c
index db7ed68c03..37158981ae 100644
--- a/libavformat/ogg.c
+++ b/libavformat/ogg.c
@@ -249,7 +249,6 @@ static int ogg_read_close(AVFormatContext *avfcontext) {
ogg_stream_clear(&context->os) ;
ogg_sync_clear(&context->oy) ;
- av_freep(&avfcontext->streams[0]->codec.extradata);
return 0 ;
}
diff --git a/libavformat/ogg2.c b/libavformat/ogg2.c
index ce1bcbae6a..7ce13c4f99 100644
--- a/libavformat/ogg2.c
+++ b/libavformat/ogg2.c
@@ -542,7 +542,6 @@ ogg_read_close (AVFormatContext * s)
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;
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 218ae38a76..0c900dc639 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -329,11 +329,6 @@ static int smacker_read_close(AVFormatContext *s)
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;
}
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d135015d3a..f011bc2d65 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2167,6 +2167,7 @@ void av_close_input_file(AVFormatContext *s)
av_parser_close(st->parser);
}
av_free(st->index_entries);
+ av_free(st->codec->extradata);
av_free(st->codec);
av_free(st);
}