Commit 9558f935 authored by Kevin Daudt's avatar Kevin Daudt

community/mlt: fix deadlock due to recursive mutex

See: #11838 (comment 114554)

Fixes #11838
parent 0a470951
......@@ -2,7 +2,7 @@
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=mlt
pkgver=6.22.1
pkgrel=0
pkgrel=1
pkgdesc="MLT Multimedia Framework"
url="https://www.mltframework.org/"
arch="all"
......@@ -13,6 +13,7 @@ makedepends="python3-dev ffmpeg-dev libsamplerate-dev sox-dev jack-dev
subpackages="$pkgname-dev py3-$pkgname:py3"
source="https://github.com/mltframework/mlt/archive/v$pkgver/mlt-v$pkgver.tar.gz
musl-locale.patch
mlt-fix-mutex.patch
"
build() {
......@@ -50,4 +51,5 @@ py3() {
}
sha512sums="c620b68d35c90eab650c70768a4ae631dec83ece6dd3fd8e09f9300d837d8e0f3da1b098786188f9c1216800f848dd5db7c9e5fa03e816fba3fbcf3c63324c74 mlt-v6.22.1.tar.gz
dfa4c192ce6121a3c86141c46a08eaf6cd6bd81c120786bdb1ef564bf7878dcb44031280b34609048409c3d09e8c0e1bd430dae1fe777ef030daf09b1dfd90a3 musl-locale.patch"
dfa4c192ce6121a3c86141c46a08eaf6cd6bd81c120786bdb1ef564bf7878dcb44031280b34609048409c3d09e8c0e1bd430dae1fe777ef030daf09b1dfd90a3 musl-locale.patch
44bbd051fb1b1db7e0522dc3112e468734f69688dc451320bc11bbef61b3dde2236e9db0a79203ec94439dcec5d44f2dec4a781655a3350787d03528b98b22bd mlt-fix-mutex.patch"
Reason: The mutex is used recursively, but not declared as such
Upsteam: No
Url: https://gitlab.alpinelinux.org/alpine/aports/-/issues/11838#note_114555
diff -ruN mlt-6.22.1/src/framework/mlt_property.c src2/mlt-6.22.1/src/framework/mlt_property.c
--- mlt-6.22.1/src/framework/mlt_property.c 2020-08-01 20:23:06.000000000 +0200
+++ mlt-6.22.1/src/framework/mlt_property.c 2020-09-18 23:38:45.257937933 +0200
@@ -90,8 +90,11 @@
mlt_property mlt_property_init( )
{
mlt_property self = calloc( 1, sizeof( *self ) );
- if ( self )
- pthread_mutex_init( &self->mutex, NULL );
+ if ( self ) {
+ pthread_mutexattr_t ma;
+ pthread_mutexattr_settype( &ma, PTHREAD_MUTEX_RECURSIVE );
+ pthread_mutex_init( &self->mutex, &ma );
+ }
return self;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment