#include <framework/mlt_frame.h>
+#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int owidth = *width;
int oheight = *height;
mlt_frame_get_image( this, image, format, &owidth, &oheight, 0 );
+ if ( *width == 0 )
+ *width = 720;
+ if ( *height == 0 )
+ *height = 576;
if ( !strcmp( mlt_properties_get( mlt_frame_properties( this ), "resize.scale" ), "affine" ) )
*image = mlt_frame_rescale_yuv422( this, *width, *height );
else
/** Constructor for the filter.
*/
-mlt_filter filter_resize_init( void *arg )
+mlt_filter filter_resize_init( char *arg )
{
mlt_filter this = calloc( sizeof( struct mlt_filter_s ), 1 );
if ( mlt_filter_init( this, this ) == 0 )
{
this->process = filter_process;
- mlt_properties_set( mlt_filter_properties( this ), "scale", "off" );
+ if ( arg != NULL )
+ mlt_properties_set( mlt_filter_properties( this ), "scale", arg );
+ else
+ mlt_properties_set( mlt_filter_properties( this ), "scale", "off" );
}
return this;
}