From ffbb463ebbf3d744d45ad07c2428329bff06a4b7 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Fri, 3 Aug 2007 04:34:01 +0000 Subject: [PATCH] consumer_sdl_still.c: bugfix initialisation of window dimensions due to recent profiles addition 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 | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/modules/sdl/consumer_sdl_still.c b/src/modules/sdl/consumer_sdl_still.c index 433ba89..71e698b 100644 --- a/src/modules/sdl/consumer_sdl_still.c +++ b/src/modules/sdl/consumer_sdl_still.c @@ -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 ) -- 1.7.4.4