Workaround for taglib not been tread safe

el8
Nicolas Chauvet 14 years ago
parent 1a59c074fc
commit 1a5dd792d8

@ -0,0 +1,40 @@
From: Rafaël Carré <rafael.carre@gmail.com>
Date: Sun, 24 Oct 2010 16:14:33 +0000 (+0200)
Subject: taglib is not thread-safe
X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=8675d26cea713ca9ebae3b91bd7c3e9bb320dcb1;hp=2ad5d811df1fcb2c0229d9e21fdd93d43344d19c
taglib is not thread-safe
Fix ticket #3958
---
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 33866d0..f67dbda 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -77,6 +77,8 @@
#include <textidentificationframe.h>
#include <uniquefileidentifierframe.h>
+// taglib is not thread safe
+static vlc_mutex_t taglib_lock = VLC_STATIC_MUTEX;
// Local functions
static int ReadMeta ( vlc_object_t * );
@@ -363,6 +365,7 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_t *p_demux, demux_meta_t *p_de
*/
static int ReadMeta( vlc_object_t* p_this)
{
+ vlc_mutex_locker locker (&taglib_lock);
demux_meta_t* p_demux_meta = (demux_meta_t *)p_this;
demux_t* p_demux = p_demux_meta->p_demux;
vlc_meta_t* p_meta;
@@ -585,6 +588,7 @@ static void WriteMetaToXiph( Ogg::XiphComment* tag, input_item_t* p_item )
static int WriteMeta( vlc_object_t *p_this )
{
+ vlc_mutex_locker locker (&taglib_lock);
meta_export_t *p_export = (meta_export_t *)p_this;
input_item_t *p_item = p_export->p_item;
FileRef f;

@ -21,7 +21,7 @@
Summary: The cross-platform open-source multimedia framework, player and server
Name: vlc
Version: 1.1.4
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.videolan.org
@ -31,6 +31,7 @@ Source2: http://www.live555.com/liveMedia/public/live.%{live555_date}.tar.gz
%endif
Patch0: vlc-1.1.0-vlc-cache-gen_noerror.patch
Patch1: 0001-Libnotify-depends-on-a-gtk.patch
Patch2: vlc-1.1.0-pending-taglib-not-tread_safe.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
@ -228,6 +229,7 @@ JACK audio plugin for the VLC media player.
%endif
%patch0 -p1 -b .noerror
%patch1 -p1 -b .gtk23
%patch2 -p1 -b .taglib_ts
sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in
rm modules/access/videodev2.h
@ -521,6 +523,9 @@ fi || :
%changelog
* Sun Oct 24 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-4
- Workaround for taglib not been tread safe
* Sun Oct 17 2010 Nicolas Chauvet <kwizart@gmail.com> - 1.1.4-3
- Explicitely use -fPIC compilation even for dmo plugin
- Silence post scriptlet

Loading…
Cancel
Save