Mercurial > libavformat.hg
changeset 5545:3a5082b94ab3 libavformat
do not skip mdat data if it's the last atom, avoids one seek
author | bcoudurier |
---|---|
date | Wed, 13 Jan 2010 23:33:29 +0000 |
parents | fc48f8bfbf2e |
children | 4f6eb8fc81ec |
files | mov.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Wed Jan 13 23:27:52 2010 +0000 +++ b/mov.c Wed Jan 13 23:33:29 2010 +0000 @@ -228,8 +228,9 @@ 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);