// Update the frame
mlt_properties properties = mlt_frame_properties( frame );
- mlt_properties_set_data( properties, "image", new_image, size, mlt_pool_release, NULL );
+ mlt_frame_set_image( frame, new_image, size, mlt_pool_release );
memcpy( new_image, *image, size );
mlt_properties_set( properties, "progressive", mlt_properties_get( MLT_FRAME_PROPERTIES(nested_frame), "progressive" ) );
*image = new_image;
+
+ // Copy the alpha channel
+ uint8_t *alpha = mlt_properties_get_data( MLT_FRAME_PROPERTIES( nested_frame ), "alpha", &size );
+ if ( alpha && size > 0 )
+ {
+ new_image = mlt_pool_alloc( size );
+ memcpy( new_image, alpha, size );
+ mlt_frame_set_alpha( frame, new_image, size, mlt_pool_release );
+ }
return result;
}
// Seek the producer to the correct place
// Calculate our positions
- double actual_position = mlt_producer_get_speed( this ) * (double)mlt_producer_position( this );
+ double actual_position = (double)mlt_producer_position( this );
+ if ( mlt_producer_get_speed( this ) != 0 )
+ actual_position *= mlt_producer_get_speed( this );
mlt_position need_first = floor( actual_position );
mlt_producer_seek( cx->producer, need_first );
mlt_producer producer_consumer_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
- mlt_producer this = mlt_producer_new( );
+ mlt_producer this = mlt_producer_new( profile );
// Encapsulate the real producer
mlt_profile temp_profile = mlt_profile_init( NULL );