Commit 9305f1ec authored by Kevin Daudt's avatar Kevin Daudt

community/mlt: fix deadlock due to recursive mutex

See: #11838 (comment 114554)

cherry picked from commit 9558f935
parent 9ae70478
......@@ -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="939e837fb07ff0eace308987d83913e979f82c6eb156b40fde784f3f2b031b5f6896ac96dcde1627925cbb6fc76725f3fc4e5b2d0616fae11263648bcdbe82e3 mlt-v6.20.0.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