]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/filter_avcolour_space.c
calc image size as largest of two image size calculation methods
[mlt] / 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 )