From: Maksym Veremeyenko Date: Thu, 8 Nov 2012 11:48:04 +0000 (+0200) Subject: calc image size as largest of two image size calculation methods X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e244b4b3191573ce7399f21b2c3e68aa558f624c;p=mlt calc image size as largest of two image size calculation methods --- diff --git a/src/modules/avformat/filter_avcolour_space.c b/src/modules/avformat/filter_avcolour_space.c index 3e804e9c..5bf53ea4 100644 --- a/src/modules/avformat/filter_avcolour_space.c +++ b/src/modules/avformat/filter_avcolour_space.c @@ -169,7 +169,8 @@ static int convert_image( mlt_frame frame, uint8_t **image, mlt_image_format *fo int in_fmt = convert_mlt_to_av_cs( *format ); int out_fmt = convert_mlt_to_av_cs( output_format ); - int size = avpicture_get_size( out_fmt, width, height ); + int size = FFMAX( avpicture_get_size( out_fmt, width, height ), + mlt_image_format_size( output_format, width, height, NULL ) ); uint8_t *output = mlt_pool_alloc( size ); if ( *format == mlt_image_rgb24a || *format == mlt_image_opengl )