diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-01-13 23:33:29 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-01-13 23:33:29 +0000 |
commit | 49544546b0c5b5a1df935ec7c34f42c8e2231267 (patch) | |
tree | 2006cb83a196342fb4d22f9fe9305a3d98aea0cf /libavformat/mov.c | |
parent | 08c8e66a996ddbb129f42e0fa121397b65b95aa9 (diff) | |
download | ffmpeg-49544546b0c5b5a1df935ec7c34f42c8e2231267.tar.gz |
do not skip mdat data if it's the last atom, avoids one seek
Originally committed as revision 21209 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index f4151bd879..50a5e789ca 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -228,8 +228,9 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom) int err = parse(c, pb, a); if (err < 0) return err; - if (url_is_streamed(pb) && c->found_moov && c->found_mdat) - break; + if (c->found_moov && c->found_mdat && + (url_is_streamed(pb) || start_pos + a.size == url_fsize(pb))) + return 0; left = a.size - url_ftell(pb) + start_pos; if (left > 0) /* skip garbage at atom end */ url_fskip(pb, left); |