diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-03-20 16:00:45 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-03-20 16:00:45 +0000 |
commit | f9900374ec9650b4920cac880e15540a951492b6 (patch) | |
tree | 1c2e1976328e641a08511da770028321770ff85d /libavformat | |
parent | 1e77810d3b4d9d7933aa1cd3c20b22a55dad9902 (diff) | |
download | ffmpeg-f9900374ec9650b4920cac880e15540a951492b6.tar.gz |
free track data asap
Originally committed as revision 12515 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 419e4b809b..75174825f1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1271,6 +1271,14 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) st->codec->sample_rate= 0; /* let decoder init parameters properly */ break; } + + /* Do not need those anymore. */ + av_freep(&sc->chunk_offsets); + av_freep(&sc->sample_to_chunk); + av_freep(&sc->sample_sizes); + av_freep(&sc->keyframes); + av_freep(&sc->stts_data); + return 0; } @@ -1545,7 +1553,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) { MOVContext *mov = s->priv_data; ByteIOContext *pb = s->pb; - int i, err; + int err; MOV_atom_t atom = { 0, 0, 0 }; mov->fc = s; @@ -1564,15 +1572,6 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) } dprintf(mov->fc, "on_parse_exit_offset=%d\n", (int) url_ftell(pb)); - for(i=0; i<s->nb_streams; i++) { - MOVStreamContext *sc = s->streams[i]->priv_data; - /* Do not need those anymore. */ - av_freep(&sc->chunk_offsets); - av_freep(&sc->sample_to_chunk); - av_freep(&sc->sample_sizes); - av_freep(&sc->keyframes); - av_freep(&sc->stts_data); - } return 0; } |