]> git.sesse.net Git - mlt/blobdiff - src/modules/gtk2/producer_pango.c
Add service locks for parallelism.
[mlt] / src / modules / gtk2 / producer_pango.c
index 7c85ae881f4ec20003b97b3e52e6e683dfd35955..814541b2b399028fcb100c2252d82288da3b6cef 100644 (file)
@@ -466,6 +466,8 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
        *width = mlt_properties_get_int( properties, "rescale_width" );
        *height = mlt_properties_get_int( properties, "rescale_height" );
 
+       mlt_service_lock( MLT_PRODUCER_SERVICE( &this->parent ) );
+
        // Refresh the image
        pthread_mutex_lock( &pango_mutex );
        refresh_image( frame, *width, *height );
@@ -492,6 +494,7 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
        }
 
        pthread_mutex_unlock( &pango_mutex );
+       mlt_service_unlock( MLT_PRODUCER_SERVICE( &this->parent ) );
 
        return error;
 }