@@ -448,6 +448,7 @@ static int generate_test_image(mlt_properties properties,
448448 case mlt_image_none :
449449 case mlt_image_movit :
450450 case mlt_image_opengl_texture :
451+ case mlt_image_private :
451452 * format = mlt_image_yuv422 ;
452453 break ;
453454 case mlt_image_invalid :
@@ -1113,15 +1114,13 @@ mlt_frame mlt_frame_clone(mlt_frame self, int is_deep)
11131114 }
11141115 size = 0 ;
11151116 data = mlt_properties_get_data (properties , "image" , & size );
1116- if (data && mlt_image_movit != mlt_properties_get_int (properties , "format" )) {
1117+ mlt_image_format format = mlt_properties_get_int (properties , "format" );
1118+ if (data && format != mlt_image_movit && format != mlt_image_private ) {
11171119 int width = mlt_properties_get_int (properties , "width" );
11181120 int height = mlt_properties_get_int (properties , "height" );
11191121
11201122 if (!size )
1121- size = mlt_image_format_size (mlt_properties_get_int (properties , "format" ),
1122- width ,
1123- height ,
1124- NULL );
1123+ size = mlt_image_format_size (format , width , height , NULL );
11251124 copy = mlt_pool_alloc (size );
11261125 memcpy (copy , data , size );
11271126 mlt_properties_set_data (new_props , "image" , copy , size , mlt_pool_release , NULL );
@@ -1255,15 +1254,13 @@ mlt_frame mlt_frame_clone_image(mlt_frame self, int is_deep)
12551254
12561255 if (is_deep ) {
12571256 data = mlt_properties_get_data (properties , "image" , & size );
1258- if (data && mlt_image_movit != mlt_properties_get_int (properties , "format" )) {
1257+ mlt_image_format format = mlt_properties_get_int (properties , "format" );
1258+ if (data && format != mlt_image_movit && format != mlt_image_private ) {
12591259 int width = mlt_properties_get_int (properties , "width" );
12601260 int height = mlt_properties_get_int (properties , "height" );
12611261
12621262 if (!size )
1263- size = mlt_image_format_size (mlt_properties_get_int (properties , "format" ),
1264- width ,
1265- height ,
1266- NULL );
1263+ size = mlt_image_format_size (format , width , height , NULL );
12671264 copy = mlt_pool_alloc (size );
12681265 memcpy (copy , data , size );
12691266 mlt_properties_set_data (new_props , "image" , copy , size , mlt_pool_release , NULL );
0 commit comments