]> git.sesse.net Git - mlt/blobdiff - src/modules/frei0r/filter_frei0r.c
Add service locks for parallelism.
[mlt] / src / modules / frei0r / filter_frei0r.c
index fde17336f1b19f2cde8113d57374840918e1bd9b..046597eadc771e2ed4aced07f483b2342f2901a4 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "frei0r_helper.h"
 #include <string.h>
+
 static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable )
 {
 
@@ -36,8 +37,9 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                mlt_position time = mlt_properties_get_position( properties, "_filter_position" );
                double position = ( double )( time ) / ( double )( length );
                
+               mlt_service_lock( MLT_FILTER_SERVICE( filter ) );
                process_frei0r_item( filter_type, position, properties, this, image, width, height );
-               
+               mlt_service_unlock( MLT_FILTER_SERVICE( filter ) );
        }
 
        return error;