From: lilo_booter Date: Sun, 24 Oct 2004 18:40:59 +0000 (+0000) Subject: Oops - need to parse the size in the preview X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=7b24e5659345b8ef38a3a8634a46d3f3a480dd1f;p=melted Oops - need to parse the size in the preview git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@491 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/sdl/consumer_sdl_preview.c b/src/modules/sdl/consumer_sdl_preview.c index ddb3ddf..8bf9e7c 100644 --- a/src/modules/sdl/consumer_sdl_preview.c +++ b/src/modules/sdl/consumer_sdl_preview.c @@ -61,6 +61,22 @@ mlt_consumer consumer_sdl_preview_init( char *arg ) { // Get the parent consumer object mlt_consumer parent = &this->parent; + + // Get the properties + mlt_properties properties = mlt_consumer_properties( parent ); + + // Get the width and height + int width = mlt_properties_get_int( properties, "width" ); + int height = mlt_properties_get_int( properties, "height" ); + + // Process actual param + if ( arg == NULL || sscanf( arg, "%dx%d", &width, &height ) == 2 ) + { + mlt_properties_set_int( properties, "width", width ); + mlt_properties_set_int( properties, "height", height ); + } + + // Create child consumers this->play = mlt_factory_consumer( "sdl", arg ); this->still = mlt_factory_consumer( "sdl_still", arg ); mlt_properties_set( mlt_consumer_properties( parent ), "real_time", "0" );