From e244b4b3191573ce7399f21b2c3e68aa558f624c Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko Date: Thu, 8 Nov 2012 13:48:04 +0200 Subject: [PATCH] calc image size as largest of two image size calculation methods --- src/modules/avformat/filter_avcolour_space.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ) -- 2.39.2