[vlc-devel] [PATCH] FreeType: Create() must lock before calling non-thread-safe FontContfig.

Rémi Denis-Courmont remi at remlab.net
Thu Jan 31 10:24:56 CET 2013


On Thu, 31 Jan 2013 09:41:33 +0100, Jerome Forissier <jerome at taodyne.com>
wrote:
> Fixes frequent crashes observed when starting simultaneous playback of
> several videos.

Firstly, FontConfig is also used from RenderCommon(), not only from
Create(). So I doubt your patch really protects against unsafe use of old
FontConfig versions within VLC.

Secondly, a static lock in VLC will never be sufficient. FontConfig can
also be used from other threads from non-VLC code, and it often is so. In
particular, a number of UI frameworks on Linux/BSD call FontConfig
internally. Such crashes have been observed at times.

So it seems to be the proper fix consists of requiring a thread-safe
version of FontConfig, i.e. 2.10.91 or later.

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list