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

Joel Klinghed the_jk at yahoo.com
Thu Jul 30 00:52:09 CEST 2015


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.

My solution is not to use stream->eof at all but instead react to
stream_read() returning == 0 as a marker for when the stream has ended

Regards, Joel Klinghed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-playtreeparser-eof-0.patch
Type: text/x-patch
Size: 1542 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20150730/e3457358/attachment.bin>

More information about the MPlayer-dev-eng mailing list