From: ddennedy Date: Mon, 3 Mar 2008 07:19:14 +0000 (+0000) Subject: filter_rescale.c: if input width or height are zero, infer them from the profile X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=1839ff2bf3ee7d7946be91f7434d4bb24c8ed24d;p=melted filter_rescale.c: if input width or height are zero, infer them from the profile git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1089 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/core/filter_resize.c b/src/modules/core/filter_resize.c index 128c86b..cb9c61b 100644 --- a/src/modules/core/filter_resize.c +++ b/src/modules/core/filter_resize.c @@ -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;