]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_crop.c
Let loader producer use new GLSL normalizing filters (opengl branch).
[mlt] / src / modules / core / filter_crop.c
index 168f687b9b0d0ed80a1b7d7e0ae4d3c257569aaf..8f3b7765042315e8e4f13afbc2329c428b63d3f5 100644 (file)
@@ -96,13 +96,6 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                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" ) );
                
@@ -158,8 +151,8 @@ static mlt_frame filter_process( mlt_filter filter, mlt_frame frame )
                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 ) );
 
@@ -214,8 +207,8 @@ static mlt_frame filter_process( mlt_filter filter, mlt_frame frame )
                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;
 }
@@ -225,7 +218,7 @@ static mlt_frame filter_process( mlt_filter filter, mlt_frame 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;