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

Frederic YHUEL fyhuel at viotech.net
Mon Jun 25 20:34:32 CEST 2012

On Mon, Jun 25, 2012 at 7:15 PM, Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
> 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
> rewrite.

And since the module needs to be ported into a access_demux module, it
seems pointless to do huge modifications before that move, no?

@Hugo: thanks for the review btw :)

Best regards

More information about the vlc-devel mailing list