X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fsdl%2Fconsumer_sdl.c;fp=src%2Fmodules%2Fsdl%2Fconsumer_sdl.c;h=70e65d9cf3ca13204ce25c69ac68116b0e6c58fa;hb=40b169c095486ba1b868486eb98a47c41f36ce8c;hp=fdfcdc240892b032dae703c22fbef6fa1a5ccfae;hpb=207fccbe14c08ffb2bf429dd590b17f43fc50b04;p=melted diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c index fdfcdc2..70e65d9 100644 --- a/src/modules/sdl/consumer_sdl.c +++ b/src/modules/sdl/consumer_sdl.c @@ -102,9 +102,6 @@ mlt_consumer consumer_sdl_init( char *arg ) mlt_service service = MLT_CONSUMER_SERVICE( parent ); this->properties = MLT_SERVICE_PROPERTIES( service ); - // Default display aspect ratio - double display_ratio = mlt_properties_get_double( this->properties, "display_ratio" ); - // Set the default volume mlt_properties_set_double( this->properties, "volume", 1.0 ); @@ -136,10 +133,6 @@ mlt_consumer consumer_sdl_init( char *arg ) this->height = mlt_properties_get_int( this->properties, "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; @@ -219,6 +212,11 @@ int consumer_start( mlt_consumer parent ) if ( audio_off == 0 ) SDL_InitSubSystem( SDL_INIT_AUDIO ); + // 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 ( this->sdl_screen == NULL && display_off == 0 ) this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );