]> git.sesse.net Git - mlt/commitdiff
filter_rescale.c: if input width or height are zero, infer them from the profile
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 3 Mar 2008 07:19:14 +0000 (07:19 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 3 Mar 2008 07:19:14 +0000 (07:19 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1089 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/core/filter_resize.c

index 128c86b8b4594ce0ff86976d560a97ef05345783..cb9c61b5d047aa62af3662a312d1736fef6cb00f 100644 (file)
@@ -52,6 +52,13 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        // Retrieve the aspect ratio
        double aspect_ratio = mlt_deque_pop_back_double( MLT_FRAME_IMAGE_STACK( this ) );
 
+       // Correct Width/height if necessary
+       if ( *width == 0 || *height == 0 )
+       {
+               *width = mlt_properties_get_int( properties, "normalised_width" );
+               *height = mlt_properties_get_int( properties, "normalised_height" );
+       }
+
        // Assign requested width/height from our subordinate
        int owidth = *width;
        int oheight = *height;