]> git.sesse.net Git - mlt/commitdiff
calc image size as largest of two image size calculation methods
authorMaksym Veremeyenko <verem@m1stereo.tv>
Thu, 8 Nov 2012 11:48:04 +0000 (13:48 +0200)
committerDan Dennedy <dan@dennedy.org>
Fri, 9 Nov 2012 18:10:35 +0000 (10:10 -0800)
src/modules/avformat/filter_avcolour_space.c

index 3e804e9c4dc584d813e961260209d6e6be327d50..5bf53ea415d1d993a722aa78c6c0c5c1a28c931d 100644 (file)
@@ -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 )