[MPlayer-dev-eng] [PATCH] Fix some seek failure

Ivan Kalvachev ikalvachev at gmail.com
Tue Mar 14 09:22:17 CET 2006


2006/3/13, Alban Bedel <albeu at free.fr>:
>
> Hi,
>
> their is a little bug in stream_seek() which can lead to some strange
> seeking failure, in particular with ftp.
> Seeks are always aligned on the buffer size, then a single
> stream_fill_buffer is made and failure is returned if the wanted
> position is not in the buffer. So that obviously can fail if the call to
> stream_fill_buffer() doesn't fill the whole buffer (it doesn't have to).
[..]

Are you sure it doesn't have to?

I think stream_fill_buffer is always supposed to return full buffer,
unless EOF is reached (then it returns only the available data). It is
used this way on few other places (e.g. cache.c) and they would need
fixing. It would be better to fix it in stream_fill_buffer or t




More information about the MPlayer-dev-eng mailing list