]> git.sesse.net Git - mlt/commitdiff
consumer_sdl_still.c: bugfix initialisation of window dimensions due to recent profil...
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 3 Aug 2007 04:34:01 +0000 (04:34 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 3 Aug 2007 04:34:01 +0000 (04:34 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1022 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/sdl/consumer_sdl_still.c

index 433ba896d449b77df2c56074f42273a6f2dc40ab..71e698b3b49806bbe7d7420ebe79f4712fcf029b 100644 (file)
@@ -87,9 +87,6 @@ mlt_consumer consumer_sdl_still_init( char *arg )
                mlt_service service = MLT_CONSUMER_SERVICE( parent );
                this->properties = MLT_SERVICE_PROPERTIES( service );
 
-               // Get the default display ratio
-               double display_ratio = mlt_properties_get_double( this->properties, "display_ratio" );
-
                // We have stuff to clean up, so override the close method
                parent->close = consumer_close;
 
@@ -117,10 +114,6 @@ mlt_consumer consumer_sdl_still_init( char *arg )
                        mlt_properties_set_int( this->properties, "height", this->height );
                }
 
-               // Default window size
-               this->window_width = ( double )this->height * display_ratio;
-               this->window_height = this->height;
-
                // Set the sdl flags
                this->sdl_flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_RESIZABLE | SDL_DOUBLEBUF;
 
@@ -178,6 +171,11 @@ static int consumer_start( mlt_consumer parent )
                this->width = mlt_properties_get_int( this->properties, "width" );
                this->height = mlt_properties_get_int( this->properties, "height" );
 
+               // Default window size
+               double display_ratio = mlt_properties_get_double( this->properties, "display_ratio" );
+               this->window_width = ( double )this->height * display_ratio;
+               this->window_height = this->height;
+
                if ( sdl_started == 0 && preview_off == 0 )
                {
                        if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE ) < 0 )