changeset 4197:84251a788a67 libavformat

move ffindex set before mov_read_default so it can be used in functions
author bcoudurier
date Sun, 11 Jan 2009 21:04:25 +0000
parents 5fc3729da880
children 64ece9005d76
files mov.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Sun Jan 11 10:42:24 2009 +0000
+++ b/mov.c	Sun Jan 11 21:04:25 2009 +0000
@@ -1337,6 +1337,7 @@
     st->priv_data = sc;
     st->codec->codec_type = CODEC_TYPE_DATA;
     st->start_time = 0; /* XXX: check */
+    sc->ffindex = st->index;
 
     if ((ret = mov_read_default(c, pb, atom)) < 0)
         return ret;
@@ -1363,7 +1364,7 @@
         assert(st->duration % sc->time_rate == 0);
         st->duration /= sc->time_rate;
     }
-    sc->ffindex = st->index;
+
     mov_build_index(c, st);
 
     if (sc->dref_id-1 < sc->drefs_count && sc->drefs[sc->dref_id-1].path) {