[FFmpeg-devel] [PATCH] HTTP: optimize forward seek performance

Joel Cunningham joel.cunningham at me.com
Thu Jan 12 17:29:16 EET 2017

> On Jan 12, 2017, at 6:53 AM, Nicolas George <george at nsup.org> wrote:
> Le duodi 22 nivôse, an CCXXV, Joel Cunningham a écrit :
>> This commit optimizes HTTP forward seeks by advancing the stream on
>> the current connection when the seek amount is within the current
>> TCP window rather than closing the connection and opening a new one.
>> This improves performance because with TCP flow control, a window's
>> worth of data is always either in the local socket buffer already or
>> in-flight from the sender.
> Thanks for the patch. You may have not noticed, but there is already a
> similar logic in the higher-level API, aviobuf. See the code for
> avio_seek(). I suspect it would be a better place to implement the logic
> of avoiding seeks on slow-ish protocols.

Thanks for the feedback, I’ll take a look into how the forwarding logic could be implemented in avio_seek().  I do want to be careful that this logic doesn’t execute for non-HTTP or non-stream based protocols which don’t have flow control/automatic buffering of data.


More information about the ffmpeg-devel mailing list