Le nonidi 29 messidor, an CCXXII, Oliver Fromme a écrit :
> The solution is rather simple:  The Xing header contains a
> field that holds the length of the file in bytes.  Just
> seek to that position and check if there's another header
> (instead of EOF that should normally be there).  If there
> is, then a concatenated file follows.  This procedure has
> to be repeated, in case that more than two files were
> concatenated.

That could be dangerous, a crafted file may trick lavf into reading much
more of the file than reasonable, leading to a possible DoS, especially if
the file is accessed by network. If someone implements it, this must be kept
in mind in order to avoid it.

A much easier (but also much less accurate, of course) solution would be to
compare the size in the Xing header and the size of the file reported by the
OS or protocol, and if they do not match, print a warning and/or extrapolate
the duration.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Reply via email to