]> git.sesse.net Git - mlt/commitdiff
Oops - need to parse the size in the preview
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 24 Oct 2004 18:40:59 +0000 (18:40 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 24 Oct 2004 18:40:59 +0000 (18:40 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@491 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/sdl/consumer_sdl_preview.c

index ddb3ddf726952743e9b81157ed0c96150180ec22..8bf9e7c775071f46d7b3b19d9d8309fcd46a57af 100644 (file)
@@ -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" );