[vlc-devel] [PATCH] HLS: minor fix

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Jun 25 19:15:27 CEST 2012

On Mon, Jun 25, 2012 at 8:07 PM, Chris Smowton <cs448 at cam.ac.uk> wrote:
>> However, playback is still accessed way too much in an non thread-safe
>> manner. But that's a start!
> I tried rewriting it to be less broken when adding some HLS features I
> needed, but it was a huge pain because the locking is so fine-grained!

Yes it is :(

> I'd suggest it might be a good idea to move the big long-running operations
> outside all locks (e.g. instead of fetching segments under the segment lock
> as it does now, fetch outside the lock and just set the download pointer
> under the lock) and switch to one big lock for the HLS driver -- after all,
> there's not much inter-thread communication; all that can actually happen is
> the playlist thread makes the playlist longer, the download thread fetches a
> segment (download++) and the playback thread plays one (playback++) or seeks
> (download = something).
> Chris

I know I am a bit idealist here, but I think the current HLS
implementation would take more time to make thread safe than to


Hugo Beauzée-Luyssen
mail: hugo at beauzee.fr
skype: beauze.h

More information about the vlc-devel mailing list