]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_greyscale.c
fix some LADSPA crashing on dlclose on some systems (3538363)
[mlt] / src / modules / core / filter_greyscale.c
index d799e72d1ac320e8af2e1950686101655a1965d6..4d25abccb48e04d16482505467b842c5995813b8 100644 (file)
@@ -18,8 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "filter_greyscale.h"
-
+#include <framework/mlt_filter.h>
 #include <framework/mlt_frame.h>
 
 #include <stdio.h>
@@ -30,8 +29,9 @@
 
 static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable )
 {
+       *format = mlt_image_yuv422;
        int error = mlt_frame_get_image( this, image, format, width, height, 1 );
-       if ( error == 0 && *format == mlt_image_yuv422 )
+       if ( error == 0 )
        {
                uint8_t *p = *image;
                uint8_t *q = *image + *width * *height * 2;
@@ -53,7 +53,7 @@ static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
 /** Constructor for the filter.
 */
 
-mlt_filter filter_greyscale_init( void *arg )
+mlt_filter filter_greyscale_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
 {
        mlt_filter this = mlt_filter_new( );
        if ( this != NULL )