[PATCH] Re: [Ffmpeg-devel] avformat/av_seek_frame_binary with growing file

Kenneth Aafløy kenneth
Fri Jul 1 23:21:02 CEST 2005


Hi,

Don't know if you like CC'ing on this list or not..

l?rdag 18. juni 2005, 02:25, skrev Michael Niedermayer:
> On Friday 10 June 2005 21:59, Kenneth Aafl?y wrote:
[...]
> > > However, in av_seek_frame_binary (which is used with mpeg ts formats)
> > > there is a for (;;) loop which does not care much for a file that is
> > > currently growing in size : 
> >
> > [...]
> >
> > > If I put a 'if (tmp_pos > filesize) break;' after 'int64_t tmp_pos =
> > > ....' my seeks with growing files will happily succeed.
> >
> > No comments on this, so here is the patch.
> 
> mixes statements and declarations -> wont compile with gcc 2.95 so cant be 
> accepted

Ack!

Sorry about the delay, I'm shuffling projects around ATM.

I changed the position of the break, so that a read_timestamp is always
performed, as that seems more logical. I've also slightly changed the
filesize read, to only call url_fsize once at that location.

Kenneth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seek_with_growing_file_fix.patch
Type: text/x-diff
Size: 1203 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050701/601bd098/attachment.patch>



More information about the ffmpeg-devel mailing list