[vlc-devel] [PATCH] Fixes to permit playback of short (1-segment) HLS VOD

Chris Smowton cs448 at cam.ac.uk
Tue May 29 21:14:18 CEST 2012


Hi all,

Here's another patch for the HTTP Live Streaming filter. It failed to 
play back a 1-segment playlist file; obviously this is an unusual use of 
HLS; I only came across it because I was bulk-converting some songs, a 
couple of which were short enough to hit that case.

Briefly, the fixes are:

1. Don't try to prefetch more segments than exist in the stream
2. When a seek fails (which it does in this case, as the codec attempts 
a seek which would land in the final 3 segments), don't modify the 
current playing position. As it was, the current segment got reset 
*before* we knew the seek would work, and as a result the first few 
seconds of the song got repeated.

This second point only comes up because seeks into the final 3 segments 
in the playlist are forbidden, even for VOD streams. This makes sense 
for live streams (the check is there to stop us eroding the buffer 
against the large latency of re-fetching the playlist and then segment 
files) but not for VOD. I submitted a patch to remove the limit for that 
case, but it seems to have fallen by the wayside.

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixes-to-permit-playback-of-short-1-segment-HLS-VOD.patch
Type: text/x-patch
Size: 2656 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120529/00802e63/attachment.bin>


More information about the vlc-devel mailing list