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 );
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;
this->running = 1;
this->joined = 0;
- this->width = mlt_properties_get_int( this->properties, "width" );
- this->height = mlt_properties_get_int( this->properties, "height" );
+ if ( mlt_properties_get_int( this->properties, "width" ) > 0 )
+ this->width = mlt_properties_get_int( this->properties, "width" );
+ if ( mlt_properties_get_int( this->properties, "height" ) > 0 )
+ this->height = mlt_properties_get_int( this->properties, "height" );
this->bpp = mlt_properties_get_int( this->properties, "bpp" );
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 );