]> git.sesse.net Git - mlt/commitdiff
producer_pixbuf.c, qimage_wrapper.c: Add "force_reload" option to force image reloadi...
authorj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 22 Sep 2008 20:39:51 +0000 (20:39 +0000)
committerj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 22 Sep 2008 20:39:51 +0000 (20:39 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1182 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/gtk2/producer_pixbuf.c
src/modules/qimage/qimage_wrapper.cpp

index 4e27d658f047e4d91d3430d7fefd119a9bb16bae..d24c92081a76198c47a4af902e64c922f2a9669b 100644 (file)
@@ -98,6 +98,14 @@ static void refresh_image( mlt_frame frame, int width, int height )
        // Obtain properties of producer
        mlt_properties producer_props = MLT_PRODUCER_PROPERTIES( producer );
 
+       // Check if user wants us to reload the image
+       if ( mlt_properties_get_int( producer_props, "force_reload" ) ) 
+       {
+               pixbuf = NULL;
+               this->image = NULL;
+               mlt_properties_set_int( producer_props, "force_reload", 0 );
+       }
+
        // Obtain the cache flag and structure
        int use_cache = mlt_properties_get_int( producer_props, "cache" );
        mlt_properties cache = mlt_properties_get_data( producer_props, "_cache", NULL );
index 780fb92c384a11931c07961dd996eb5a3d5beadd..2856324b240ca047d0962dd82811d77d5888ea29 100644 (file)
@@ -92,6 +92,14 @@ void refresh_qimage( mlt_frame frame, int width, int height )
        // Obtain properties of producer
        mlt_properties producer_props = MLT_PRODUCER_PROPERTIES( producer );
 
+       // Check if user wants us to reload the image
+       if ( mlt_properties_get_int( producer_props, "force_reload" ) ) 
+       {
+               qimage = NULL;
+               self->current_image = NULL;
+               mlt_properties_set_int( producer_props, "force_reload", 0 );
+       }
+
        // Obtain the cache flag and structure
        int use_cache = mlt_properties_get_int( producer_props, "cache" );
        mlt_properties cache = ( mlt_properties )mlt_properties_get_data( producer_props, "_cache", NULL );