[FFmpeg-cvslog] r12534 - trunk/libavformat/mov.c

bcoudurier subversion
Fri Mar 21 12:04:54 CET 2008


Author: bcoudurier
Date: Fri Mar 21 12:04:54 2008
New Revision: 12534

Log:
simplify, and only stop parsing when non streamable

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Fri Mar 21 12:04:54 2008
@@ -191,7 +191,7 @@ static int mov_read_default(MOVContext *
             offset_t start_pos = url_ftell(pb);
             int64_t left;
             err = mov_default_parse_table[i].parse(c, pb, a);
-            if (c->found_moov && c->found_mdat)
+            if (url_is_streamed(pb) && c->found_moov && c->found_mdat)
                 break;
             left = a.size - url_ftell(pb) + start_pos;
             if (left > 0) /* skip garbage at atom end */
@@ -390,9 +390,6 @@ static int mov_read_mdat(MOVContext *c, 
     if(atom.size == 0) /* wrong one (MP4) */
         return 0;
     c->found_mdat=1;
-    if(c->found_moov)
-        return 1; /* found both, just go */
-    url_fskip(pb, atom.size);
     return 0; /* now go for moov */
 }
 
@@ -416,8 +413,6 @@ static int mov_read_moov(MOVContext *c, 
     /* we parsed the 'moov' atom, we can terminate the parsing as soon as we find the 'mdat' */
     /* so we don't parse the whole file if over a network */
     c->found_moov=1;
-    if(c->found_mdat)
-        return 1; /* found both, just go */
     return 0; /* now go for mdat */
 }
 




More information about the ffmpeg-cvslog mailing list