[Ffmpeg-devel] [PATCH] asf seek back at end of file after rewriting header
Sat Apr 14 04:13:15 CEST 2007
M?ns Rullg?rd wrote:
> Baptiste Coudurier <baptiste.coudurier at smartjog.com> writes:
>> Michael Niedermayer wrote:
>>> On Sat, Apr 14, 2007 at 12:20:44AM +0200, Baptiste Coudurier wrote:
>>>> Michael Niedermayer wrote:
>>>>> On Fri, Apr 13, 2007 at 11:52:41PM +0200, Baptiste Coudurier wrote:
>>>> Because without that, url_ftell will not report file size,
>>> you mean url_ftell() will not return file size after muxing an asf file has
>>> but why should url_ftell() behave like that?!
>> Why should stream position after write_trailer be at any random location?
> The file shouldn't be accessed after this, so the location shouldn't
> matter. Now it seems ffmpeg.c assumes that the file position will
> always be at the end. Rather than requiring every muxer to ensure
> this, I agree that it's better to do things properly in ffmpeg.c.
I think differently, IMHO expecting that after write_trailer,
ByteIOContext is at the end of the file does not seem weird,
and if file should not be accessed after write_trailer, how should you
know how big the file is ? f/stat ? url_fsize ? url_fsize does seek.
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel