Commit 49544546 authored by Baptiste Coudurier's avatar Baptiste Coudurier

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
parent 08c8e66a
...@@ -228,8 +228,9 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom) ...@@ -228,8 +228,9 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
int err = parse(c, pb, a); int err = parse(c, pb, a);
if (err < 0) if (err < 0)
return err; return err;
if (url_is_streamed(pb) && c->found_moov && c->found_mdat) if (c->found_moov && c->found_mdat &&
break; (url_is_streamed(pb) || start_pos + a.size == url_fsize(pb)))
return 0;
left = a.size - url_ftell(pb) + start_pos; left = a.size - url_ftell(pb) + start_pos;
if (left > 0) /* skip garbage at atom end */ if (left > 0) /* skip garbage at atom end */
url_fskip(pb, left); url_fskip(pb, left);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment