[vlc-devel] "Race condition" in livehttp module

Rob Jonson rob at hobbyistsoftware.com
Thu Jun 13 14:27:45 CEST 2013


Hi Enrique,

it looks like the issue here is that VLC isn't fully implementing the spec
on sliding playlists

http://tools.ietf.org/html/draft-pantos-http-live-streaming-07#page-19

specifically

---

   When the server removes a media URI from the Playlist, the
   corresponding media segment SHOULD remain available to clients for a
   period of time equal to the duration of the segment plus the duration
   of the longest Playlist file distributed by the server containing
   that segment.

---


given this, I think the fix would be to keep the segment for n+1 updates
where n is the number of segments retained in the window.

cheers,

Rob






On 13 June 2013 08:09, Enrique Arizón Benito <enrique.arizonbenito at gmail.com
> wrote:

>
> Hello,
>
> For an small project I'm developping an livehttp server based on
> vlc+livehttp and a web server (Apache).
>
> The livehttp module works properly but when I add the delsegs option to
> remove old segment next random raise condition sequence of events arise:
>
> Note:
>
> 1.- Clients requests index.m3u8 index file to apache
> 2.- web-server sends back the index.m3u8 index file to the client
> 3.- Client reads the m3u8 and parses it.
> 4.- livehttp creates a new ts segment, updates the index.m3u8 index and
> removes the oldest existing fragment.
> 5.- Client request to the web-server the first ts fragment it founds after
> parsing (*this fragment has just been removed in step 4*)
> 6.- web-server returns a *404-Not Found error*.
>
> I think a simple patch in modules/access_output/livehttp.c like the next
> one will fix the error.
> The two oldest files will not be removed inmediatly but just after two
> other updates:
>
> 532c532
> <     if ( p_sys->b_delsegs && i_firstseg > 1 )
> ---
> >     if ( p_sys->b_delsegs && i_firstseg > 3 )
> 534c534
> <         char *psz_name = formatSegmentPath( p_access->psz_path,
> i_firstseg-1, true );
> ---
> >         char *psz_name = formatSegmentPath( p_access->psz_path,
> i_firstseg-3, true );
>
>
> Regards!
>
> Enrique
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
>


-- 





Hobbyist Software is a trading name of Hobbyist Software Limited.
Registered office Flat 4 Eastmead Court, Bristol BS9 1HP. Registered in
England. Company no:7876492
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130613/fe05d356/attachment.html>


More information about the vlc-devel mailing list