[FFmpeg-cvslog] avcodec/ff_init_vlc_sparse: use a spinlock for thread sync

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jun 16 09:44:49 CEST 2014



On 16.06.2014, at 00:41, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Michael Niedermayer <git <at> videolan.org> writes:
> 
>> ffmpeg | branch: master | Michael Niedermayer | 
>> Sat Jul 13 13:32:39 2013 +0200|
>> [6af8326354ed6c1c68b53b3f2bba6697fb2d3bff] | 
>> committer: Michael Niedermayer
>> 
>> avcodec/ff_init_vlc_sparse: use a spinlock for thread sync
> 
> This commit leads to many deadlocks when running fate 
> on AIX PPC64, for example when reading the mp2 file 
> produced by fate-acodec-mp2.

I don't know the exact code that was used, but spinlocks in the traditional sense can only be used when you can _guarantee_ that each thread runs on its own, fully independent CPU.
I.e. spinlocks can't be used correctly in user-space, and hangs are the expected outcome when you do it anyway.


More information about the ffmpeg-cvslog mailing list