From 6da84993283a4478905f137216d516d086d80cfb Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Mon, 13 Sep 2010 22:41:02 -0700 Subject: [PATCH] Fix bug with crop always asking for RGB even when not cropping! --- src/modules/core/filter_crop.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modules/core/filter_crop.c b/src/modules/core/filter_crop.c index ff91b952..4ff1c2a6 100644 --- a/src/modules/core/filter_crop.c +++ b/src/modules/core/filter_crop.c @@ -72,10 +72,6 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * mlt_properties_set_int( properties, "rescale_height", mlt_properties_get_int( properties, "crop.original_height" ) ); } - // Subsampled YUV is messy and less precise. - if ( *format == mlt_image_yuv422 ) - *format = mlt_image_rgb24; - // Now get the image error = mlt_frame_get_image( this, image, format, width, height, writable ); @@ -89,6 +85,13 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * { int bpp; + // Subsampled YUV is messy and less precise. + if ( *format == mlt_image_yuv422 ) + { + *format = mlt_image_rgb24; + mlt_frame_get_image( this, image, format, width, height, writable ); + } + mlt_log_debug( NULL, "[filter crop] %s %dx%d -> %dx%d\n", mlt_image_format_name(*format), *width, *height, owidth, oheight); switch ( *format ) -- 2.39.2