- mlt_frame cloneFrame( mlt_frame frame )
- {
- mlt_frame new_frame = mlt_frame_init( NULL );
- mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
- mlt_properties new_props = MLT_FRAME_PROPERTIES( new_frame );
- void *data;
- void *copy;
- int size;
-
- mlt_properties_inherit( new_props, properties );
- mlt_properties_set_int( new_props, "audio_samples", 0 );
- data = mlt_properties_get_data( properties, "image", &size );
- copy = mlt_pool_alloc( size );
- memcpy( copy, data, size );
- mlt_properties_set_data( new_props, "image", copy, size, mlt_pool_release, NULL );
-
- return new_frame;
- }
-