mlt_log_debug( NULL, "[filter crop] %s %dx%d -> %dx%d\n", mlt_image_format_name(*format),
*width, *height, owidth, oheight);
- // Provides a manual override for misreported field order
- if ( mlt_properties_get( properties, "meta.top_field_first" ) )
- {
- mlt_properties_set_int( properties, "top_field_first", mlt_properties_get_int( properties, "meta.top_field_first" ) );
- mlt_properties_set_int( properties, "meta.top_field_first", 0 );
- }
-
if ( top % 2 )
mlt_properties_set_int( properties, "top_field_first", !mlt_properties_get_int( properties, "top_field_first" ) );
int right = mlt_properties_get_int( filter_props, "right" );
int top = mlt_properties_get_int( filter_props, "top" );
int bottom = mlt_properties_get_int( filter_props, "bottom" );
- int width = mlt_properties_get_int( frame_props, "real_width" );
- int height = mlt_properties_get_int( frame_props, "real_height" );
+ int width = mlt_properties_get_int( frame_props, "meta.media.width" );
+ int height = mlt_properties_get_int( frame_props, "meta.media.height" );
int use_profile = mlt_properties_get_int( filter_props, "use_profile" );
mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
mlt_properties_set_int( frame_props, "crop.bottom", bottom );
mlt_properties_set_int( frame_props, "crop.original_width", width );
mlt_properties_set_int( frame_props, "crop.original_height", height );
- mlt_properties_set_int( frame_props, "real_width", width - left - right );
- mlt_properties_set_int( frame_props, "real_height", height - top - bottom );
+ mlt_properties_set_int( frame_props, "meta.media.width", width - left - right );
+ mlt_properties_set_int( frame_props, "meta.media.height", height - top - bottom );
}
return frame;
}
mlt_filter filter_crop_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
- mlt_filter filter = calloc( sizeof( struct mlt_filter_s ), 1 );
+ mlt_filter filter = calloc( 1, sizeof( struct mlt_filter_s ) );
if ( mlt_filter_init( filter, filter ) == 0 )
{
filter->process = filter_process;