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
release/0.6
Baptiste Coudurier 15 years ago
parent 08c8e66a99
commit 49544546b0
  1. 5
      libavformat/mov.c

@ -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);

Loading…
Cancel
Save