[MPlayer-dev-eng] [PATCH] fix seeking in demux_lavf

Aurelien Jacobs aurel at gnuage.org
Wed Aug 6 01:12:56 CEST 2008


Hi,

In some circumstances demux_lavf have problems with seeking.
Let me explain one situation:
One lavf demuxer (let's say matroska) try to seek to the end
of a file to read the index. Unfortunately, this file is
truncated. The call to stream_seek() fails, and streem_seek()
trash the stream cache as a side effect. Then the demuxer
try to seek back to it's original position. At that point,
url_fseek() don't know that the cache was trashed, and
thus, think it can just point into current buffer without
actually seeking.

Attached patch ensure that the content of the ByteIOContext
buffer is not used anymore after a stream_seek() failure.

Aurel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer_lavf_seek_fix.diff
Type: text/x-patch
Size: 1703 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080806/1f7fa0e0/attachment.bin>


More information about the MPlayer-dev-eng mailing list