]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_watermark.c
Add service locks for parallelism.
[mlt] / src / modules / core / filter_watermark.c
index e1e95d62f6cf3b6f34d0915b53ddfba3069919f2..bb9ffd889ac7924d68fbb3f8a7819d65e5ee3dc3 100644 (file)
@@ -42,6 +42,8 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
        // Get the properties of the filter
        mlt_properties properties = MLT_FILTER_PROPERTIES( this );
 
+       mlt_service_lock( MLT_FILTER_SERVICE( this ) );
+
        // Get the producer from the filter
        mlt_producer producer = mlt_properties_get_data( properties, "producer", NULL );
 
@@ -115,6 +117,8 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                mlt_properties_pass( producer_properties, properties, "producer." );
        }
 
+       mlt_service_unlock( MLT_FILTER_SERVICE( this ) );
+
        // Only continue if we have both producer and composite
        if ( composite != NULL && producer != NULL )
        {