sdl hacks
[melted] / src / modules / gtk2 / filter_rescale.c
index f70c039..02b7644 100644 (file)
@@ -91,6 +91,13 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                        // Return the output
                        *image = output;
                }
+               else if ( *format == mlt_image_yuv422 && !strcmp( interps, "none" ) )
+               {
+                       // Do nothing
+                       *width = iwidth;
+                       *height = iheight;
+                       *image = input;
+               }
                else if ( *format == mlt_image_rgb24 || *format == mlt_image_rgb24a )
                {
                        int bpp = (*format == mlt_image_rgb24a ? 4 : 3 );
@@ -205,14 +212,11 @@ static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
 
 mlt_filter filter_rescale_init( char *arg )
 {
-       mlt_filter this = calloc( sizeof( struct mlt_filter_s ), 1 );
-       if ( mlt_filter_init( this, this ) == 0 )
+       mlt_filter this = mlt_filter_new( );
+       if ( this != NULL )
        {
                this->process = filter_process;
-               if ( arg != NULL )
-                       mlt_properties_set( mlt_filter_properties( this ), "interpolation", arg );
-               else
-                       mlt_properties_set( mlt_filter_properties( this ), "interpolation", "bilinear" );
+               mlt_properties_set( mlt_filter_properties( this ), "interpolation", arg == NULL ? "bilinear" : arg );
        }
        return this;
 }