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

Jean-Baptiste Kempf jb at videolan.org
Tue May 29 21:16:01 CEST 2012


Hello,

On Tue, May 29, 2012 at 08:14:18PM +0100, Chris Smowton wrote :
> 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.

Fun use 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.

This seems to be 3 fixes, you should really split the commits
accordingly (git reset HEAD^ && git commit -p can help)

Best regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list