summaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-21 11:04:54 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-21 11:04:54 +0000
commitdb3ee6cc9674b069c997687e8232685a534b9bdc (patch)
tree3f563cd32dca1c6ffb86a3dc9f55b6779bf8dfca /libavformat/mov.c
parent19d02551d765e7ba5814fc8e5d8469ba61d6e1ee (diff)
downloadffmpeg-streaming-db3ee6cc9674b069c997687e8232685a534b9bdc.zip
ffmpeg-streaming-db3ee6cc9674b069c997687e8232685a534b9bdc.tar.gz
simplify, and only stop parsing when non streamable
Originally committed as revision 12534 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f9ddc48..8d87f24 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -191,7 +191,7 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
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, ByteIOContext *pb, MOV_atom_t atom)
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, ByteIOContext *pb, MOV_atom_t atom)
/* 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 */
}
OpenPOWER on IntegriCloud