[Ffmpeg-devel] [PATCH] asf seek back at end of file after rewriting header

Reimar Döffinger Reimar.Doeffinger
Sat Apr 14 17:59:24 CEST 2007

On Sat, Apr 14, 2007 at 10:53:15AM +0200, Michael Niedermayer wrote:
> On Sat, Apr 14, 2007 at 04:13:15AM +0200, Baptiste Coudurier wrote:
> > 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.
> if(url_is_streamed()) size= url_ftell()
> else                  size= url_fsize()
> might work ...

why not
size = url_fsize();
and if size <0 (i.e. error) just don't print that info?
Because 1) url_fsize probably could be improved to provide this info
also for streams (at least if we wrote them ourselves) 2) I am not
convinced it is that important 3) That way of calculating overhead seems
a bit hackish to me anyway.

Reimar D?ffinger

More information about the ffmpeg-devel mailing list