Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] Fix incomplete loading of playlists of certain sizes




On Thu, Jul 30, 2015 at 12:52:09AM +0200, Joel Klinghed wrote:
> Hi,
> 
> the bug this patches fixes appears when you have playlist files of a
> size larger than the buffer size used by playtreeparser.c but smaller
> than the buffer size used by stream.c.
> What happens is that the whole playlist file is read by stream.c in and
> put in the stream buffer by stream_fill_buffer() and stream->eof is set
> to true. However, playtreeparser.c only fills it's own buffer and then
> upon seeing stream->eof being true, treats the playlist as ended even
> tho the stream buffer still contains data.

stream_fill_buffer does not set eof, only stream_read_internal does.
stream_read_internal should only be called when the stream
buffer is empty, and will only set eof if it cannot read any further
data, i.e. the current position really is the end of the file.
So something is wrong with your explanation.
One potential issue is that seeking back from EOF will not unset
EOF, that needs to be done separately, so maybe that is what
causes the issue you see?
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng