Commit f9900374 authored by Baptiste Coudurier's avatar Baptiste Coudurier

free track data asap

Originally committed as revision 12515 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1e77810d
...@@ -1271,6 +1271,14 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -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 */ st->codec->sample_rate= 0; /* let decoder init parameters properly */
break; 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; return 0;
} }
...@@ -1545,7 +1553,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1545,7 +1553,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
{ {
MOVContext *mov = s->priv_data; MOVContext *mov = s->priv_data;
ByteIOContext *pb = s->pb; ByteIOContext *pb = s->pb;
int i, err; int err;
MOV_atom_t atom = { 0, 0, 0 }; MOV_atom_t atom = { 0, 0, 0 };
mov->fc = s; mov->fc = s;
...@@ -1564,15 +1572,6 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -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)); 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; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment