aboutsummaryrefslogtreecommitdiffstats
path: root/community/mlt/mlt-fix-mutex.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/mlt/mlt-fix-mutex.patch')
-rw-r--r--community/mlt/mlt-fix-mutex.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/community/mlt/mlt-fix-mutex.patch b/community/mlt/mlt-fix-mutex.patch
new file mode 100644
index 0000000000..fd1cdb8a20
--- /dev/null
+++ b/community/mlt/mlt-fix-mutex.patch
@@ -0,0 +1,19 @@
+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;
+ }