- // optimization for subsequent iterations on single picture
- if ( this->image != NULL && image_idx == this->image_idx )
- {
- // Set width/height
- mlt_properties_set_int( properties, "width", this->width );
- mlt_properties_set_int( properties, "height", this->height );
-
- // Set the compositing properties
- if ( mlt_properties_get( producer_props, "x" ) != NULL )
- mlt_properties_set_int( properties, "x", mlt_properties_get_int( producer_props, "x" ) );
- if ( mlt_properties_get( producer_props, "y" ) != NULL )
- mlt_properties_set_int( properties, "y", mlt_properties_get_int( producer_props, "y" ) );
- if ( mlt_properties_get( producer_props, "mix" ) != NULL )
- mlt_properties_set_double( properties, "image.mix", mlt_properties_get_double( producer_props, "mix" ) );
-
- // if picture sequence pass the image and alpha data without destructor
- mlt_properties_set_data( properties, "image", this->image, 0, NULL, NULL );
- mlt_properties_set_data( properties, "alpha", this->alpha, 0, NULL, NULL );
-
- // Set alpha mask call back
- ( *frame )->get_alpha_mask = producer_get_alpha_mask;
-
- // Stack the get image callback
- mlt_frame_push_get_image( *frame, producer_get_image );
- }
- else
- {
- free( this->image );
- free( this->alpha );
- this->image_idx = image_idx;
- pixbuf = gdk_pixbuf_new_from_file( this->filenames[ image_idx ], &error );
- }
+ 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 );
+ }
+ free( de[ i ] );
+ }