[vlc-devel] [PATCH] HLS: minor fix
fyhuel at viotech.net
Wed Jun 27 17:25:12 CEST 2012
On Mon, Jun 25, 2012 at 7:20 PM, Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
> On Mon, Jun 25, 2012 at 8:18 PM, Chris Smowton <cs448 at cam.ac.uk> wrote:
>>> 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
>> You mean you think you should just rewrite from the ground up? If so I
>> disagree! I think I could rewrite it to use one big lock and sparse
>> communication quickly, keeping the code almost all the same but with vastly
>> simplified synchronisation. I'll have a go at putting a patch together
>> (against current Git) next weekend if you're interested?
> I don't really like the idea of a big lock (of death ©), but it feels
> safer than the current implementation...
> If somebody else has an opinion, please shoot!
BTW, if you have a look at the latest version of the Smooth Streaming
module, only one lock is used, and it is perfectly fine (I hope)
because the downloader thread puts the chunks in a vlc_array_t, and
don't touch them afterwards. So only this array is guarded by locks,
and there are no data races.
Actually other things are guarded by this unique lock, like some
booleans, but that doesn't hinder perfs.
More information about the vlc-devel