mlt_frame frame = mlt_frame_init( MLT_PRODUCER_SERVICE( producer ) );
if ( frame )
{
- mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
- mlt_properties_set_data( properties, "producer_pixbuf", this, 0, NULL, NULL );
+ mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
+ mlt_properties_set_data( frame_properties, "producer_pixbuf", this, 0, NULL, NULL );
mlt_frame_set_position( frame, mlt_producer_position( producer ) );
- mlt_properties_set_position( properties, "pixbuf_position", mlt_producer_position( producer ) );
+ mlt_properties_set_position( frame_properties, "pixbuf_position", mlt_producer_position( producer ) );
refresh_image( frame, 0, 0 );
mlt_frame_close( frame );
+ mlt_properties_set_data( properties, "_pixbuf", NULL, 0, NULL, NULL );
}
}
if ( this->width == 0 )
mlt_frame frame = mlt_frame_init( MLT_PRODUCER_SERVICE( producer ) );
if ( frame )
{
- mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
- mlt_properties_set_data( properties, "producer_qimage", this, 0, NULL, NULL );
+ mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
+ mlt_properties_set_data( frame_properties, "producer_qimage", this, 0, NULL, NULL );
mlt_frame_set_position( frame, mlt_producer_position( producer ) );
- mlt_properties_set_position( properties, "qimage_position", mlt_producer_position( producer ) );
+ mlt_properties_set_position( frame_properties, "qimage_position", mlt_producer_position( producer ) );
refresh_qimage( frame, 0, 0 );
mlt_frame_close( frame );
+ mlt_properties_set_data( properties, "_qimage", NULL, 0, NULL, NULL );
}
}
if ( this->current_width == 0 )
image_idx = ( int )floor( ( double )position / ttl ) % mlt_properties_count( filenames );
this_resource = mlt_properties_get_value( filenames, image_idx );
- if ( last_resource == NULL || strcmp( last_resource, this_resource ) )
+ if ( surface == NULL || last_resource == NULL || strcmp( last_resource, this_resource ) )
{
surface = IMG_Load( this_resource );
if ( surface != NULL )
surface->refcount ++;
mlt_properties_set_data( properties, "_surface", surface, 0, ( mlt_destructor )SDL_FreeSurface, 0 );
mlt_properties_set( properties, "_last_resource", this_resource );
+ mlt_properties_set_int( properties, "_real_width", surface->w );
+ mlt_properties_set_int( properties, "_real_height", surface->h );
}
}
else if ( surface != NULL )
if ( file && ( surface = load_image( producer ) ) )
{
SDL_FreeSurface( surface );
+ mlt_properties_set_data( properties, "_surface", NULL, 0, NULL, NULL );
}
else
{