// Note - the original pixbuf is already safe and ready for destruction
pixbuf = gdk_pixbuf_scale_simple( pixbuf, width, height, interp );
-
+
// Store width and height
this->width = width;
this->height = height;
// Refresh the image
refresh_image( frame, *width, *height );
- // Determine format
- //mlt_producer this = mlt_properties_get_data( properties, "producer_pixbuf", NULL );
- //*format = ( mlt_properties_get_int( mlt_producer_properties( this ), "bpp" ) == 4 ) ? mlt_image_rgb24a : mlt_image_rgb24;
-
// May need to know the size of the image to clone it
int size = 0;
*width = mlt_properties_get_int( properties, "width" );
*height = mlt_properties_get_int( properties, "height" );
+ if ( size == 0 )
+ {
+ *width = mlt_properties_get_int( properties, "normalised_width" );
+ *height = mlt_properties_get_int( properties, "normalised_height" );
+ size = *width * ( *height + 1 );
+ }
+
// Clone if necessary
// NB: Cloning is necessary with this producer (due to processing of images ahead of use)
// The fault is not in the design of mlt, but in the implementation of pixbuf...
{
// Clone our image
uint8_t *copy = mlt_pool_alloc( size );
- memcpy( copy, image, size );
+ if ( image != NULL )
+ memcpy( copy, image, size );
// We're going to pass the copy on
image = copy;
{
snprintf( fullname, 1023, "%s%s", dir_name, de[i]->d_name );
- if ( lstat( fullname, &info ) == 0 &&
- ( S_ISREG( info.st_mode ) || ( strstr( fullname, extension ) && info.st_mode | S_IXUSR ) ) )
+ if ( strstr( fullname, extension ) && lstat( fullname, &info ) == 0 &&
+ ( S_ISREG( info.st_mode ) || info.st_mode | S_IXUSR ) )
{
this->filenames = realloc( this->filenames, sizeof( char * ) * ( this->count + 1 ) );
this->filenames[ this->count ++ ] = strdup( fullname );