changeset 3155:e22efe21156d libavformat

free track data asap
author bcoudurier
date Thu, 20 Mar 2008 16:00:45 +0000
parents 01f6f3c905db
children 487b1979f195
files mov.c
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Thu Mar 20 15:57:11 2008 +0000
+++ b/mov.c	Thu Mar 20 16:00:45 2008 +0000
@@ -1271,6 +1271,14 @@
         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 @@
 {
     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 @@
     }
     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;
 }