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

Kenneth Aafløy kenneth
Fri Jun 10 21:59:50 CEST 2005


torsdag 9. juni 2005, 01:59, skrev Kenneth Aafl?y:
> I'm implementing a server/client which makes use of libavformat/codec to
> handle reading and decoding through an abstraction layer. I'm reading files
> through the http protocol handling implemented in this abstraction layer,
> from files that may or may not be currently recording. I've chosen not to
> set the is_streamed flag of urlcontext, since that would limit my options
> when it comes to seeking. The http protocol implementation prefers http/1.1
> partial content request/responses, so seeking is relativly easy to
> implement. 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.

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



More information about the ffmpeg-devel mailing list