root corrections to miracle
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 22 Mar 2004 23:59:25 +0000 (23:59 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 22 Mar 2004 23:59:25 +0000 (23:59 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@230 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_frame.c
src/miracle/miracle_commands.c
src/miracle/miracle_unit_commands.c

index 1f2f3d2..360ecb0 100644 (file)
@@ -245,6 +245,7 @@ int mlt_frame_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *for
 
                mlt_properties_set_int( properties, "width", *width );
                mlt_properties_set_int( properties, "height", *height );
+               mlt_properties_set_int( properties, "aspect_ratio", 1 );
 
                switch( *format )
                {
index 4bb0df3..178f7f9 100644 (file)
@@ -211,7 +211,7 @@ response_codes miracle_set_global_property( command_argument cmd_arg )
                strncpy( cmd_arg->root_dir, value, 1023 );
 
                /* add a trailing slash if needed */
-               if ( cmd_arg->root_dir[ len - 1 ] != '/')
+               if ( len && cmd_arg->root_dir[ len - 1 ] != '/')
                {
                        cmd_arg->root_dir[ len ] = '/';
                        cmd_arg->root_dir[ len + 1 ] = '\0';
index af242a4..f190429 100644 (file)
@@ -47,7 +47,7 @@ int miracle_load( command_argument cmd_arg )
                filename ++;
        }
 
-       if ( filename[0] == '/' )
+       if ( strlen( cmd_arg->root_dir ) && filename[0] == '/' )
                filename++;
 
        snprintf( fullname, 1023, "%s%s", cmd_arg->root_dir, filename );