X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fgtk2%2Fproducer_pixbuf.c;h=302bf700902fe48ddf624e98c71a457fe2295756;hb=eccf04749681f70957f34fdd6742224774e72d15;hp=ee7c951f5bc44d16f0a8b4a3d308d1e4b764eb4f;hpb=a8be96087b2f59f05330f2a6320baa62d31d5c03;p=melted diff --git a/src/modules/gtk2/producer_pixbuf.c b/src/modules/gtk2/producer_pixbuf.c index ee7c951..302bf70 100644 --- a/src/modules/gtk2/producer_pixbuf.c +++ b/src/modules/gtk2/producer_pixbuf.c @@ -122,7 +122,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) { if ( width != this->width || height != this->height ) { - pixbuf = mlt_properties_get_data( producer_props, "pixbuf", NULL ); + pixbuf = mlt_properties_get_data( producer_props, "_pixbuf", NULL ); mlt_pool_release( this->image ); mlt_pool_release( this->alpha ); this->image = NULL; @@ -142,12 +142,14 @@ static void refresh_image( mlt_frame frame, int width, int height ) if ( pixbuf != NULL ) { // Register this pixbuf for destruction and reuse - mlt_properties_set_data( producer_props, "pixbuf", pixbuf, 0, ( mlt_destructor )g_object_unref, NULL ); + mlt_events_block( producer_props, NULL ); + mlt_properties_set_data( producer_props, "_pixbuf", pixbuf, 0, ( mlt_destructor )g_object_unref, NULL ); g_object_ref( pixbuf ); mlt_properties_set_data( MLT_FRAME_PROPERTIES( frame ), "pixbuf", pixbuf, 0, ( mlt_destructor )g_object_unref, NULL ); - mlt_properties_set_int( producer_props, "real_width", gdk_pixbuf_get_width( pixbuf ) ); - mlt_properties_set_int( producer_props, "real_height", gdk_pixbuf_get_height( pixbuf ) ); + mlt_properties_set_int( producer_props, "_real_width", gdk_pixbuf_get_width( pixbuf ) ); + mlt_properties_set_int( producer_props, "_real_height", gdk_pixbuf_get_height( pixbuf ) ); + mlt_events_unblock( producer_props, NULL ); // Store the width/height of the pixbuf temporarily this->width = gdk_pixbuf_get_width( pixbuf ); @@ -206,8 +208,8 @@ static void refresh_image( mlt_frame frame, int width, int height ) // Set width/height of frame mlt_properties_set_int( properties, "width", this->width ); mlt_properties_set_int( properties, "height", this->height ); - mlt_properties_set_int( properties, "real_width", mlt_properties_get_int( producer_props, "real_width" ) ); - mlt_properties_set_int( properties, "real_height", mlt_properties_get_int( producer_props, "real_height" ) ); + mlt_properties_set_int( properties, "real_width", mlt_properties_get_int( producer_props, "_real_width" ) ); + mlt_properties_set_int( properties, "real_height", mlt_properties_get_int( producer_props, "_real_height" ) ); // pass the image data without destructor mlt_properties_set_data( properties, "image", this->image, this->width * ( this->height + 1 ) * 2, NULL, NULL );