changeset 2084:f5671ebda7cd libavformat

simplify, no need for a function
author bcoudurier
date Sat, 12 May 2007 22:17:40 +0000
parents 2c3887f02739
children 8fc44b349f59
files mov.c
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Sat May 12 22:02:27 2007 +0000
+++ b/mov.c	Sat May 12 22:17:40 2007 +0000
@@ -1207,14 +1207,6 @@
 { 0L, NULL }
 };
 
-static void mov_free_stream_context(MOVStreamContext *sc)
-{
-    if(sc) {
-        av_freep(&sc->ctts_data);
-        av_freep(&sc);
-    }
-}
-
 /* XXX: is it sufficient ? */
 static int mov_probe(AVProbeData *p)
 {
@@ -1570,8 +1562,10 @@
 {
     int i;
     MOVContext *mov = s->priv_data;
-    for(i=0; i<mov->total_streams; i++)
-        mov_free_stream_context(mov->streams[i]);
+    for(i=0; i<mov->total_streams; i++) {
+        av_freep(&mov->streams[i]->ctts_data);
+        av_freep(&mov->streams[i]);
+    }
     if(mov->dv_demux){
         for(i=0; i<mov->dv_fctx->nb_streams; i++){
             av_freep(&mov->dv_fctx->streams[i]->codec);