From: lilo_booter Date: Wed, 1 Jun 2005 10:35:03 +0000 (+0000) Subject: Fallback to testcard X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=54f9582ae139c478b6ebd40ae478d05009cefd54;p=melted Fallback to testcard git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@730 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/gtk2/producer_pixbuf.c b/src/modules/gtk2/producer_pixbuf.c index 7f8b46c..e007ccd 100644 --- a/src/modules/gtk2/producer_pixbuf.c +++ b/src/modules/gtk2/producer_pixbuf.c @@ -242,8 +242,8 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form // 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... - //if ( writable ) + // The fault is not in the design of mlt, but in the implementation of the pixbuf producer... + if ( image != NULL ) { // Clone our image uint8_t *copy = mlt_pool_alloc( size ); @@ -256,6 +256,11 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form // Now update properties so we free the copy after mlt_properties_set_data( properties, "image", copy, size, mlt_pool_release, NULL ); } + else + { + // Fall back to the test card... + mlt_frame_get_image( frame, buffer, format, width, height, writable ); + } // Pass on the image *buffer = image;