aboutsummaryrefslogtreecommitdiffstats
path: root/community/mlt/mlt-fix-mutex.patch
blob: fd1cdb8a20ce15c945e5732fff3a27521dd4a91d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
 }