From b516a26231b16a26f37b56cb9a298a2d9e6c0e23 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Mon, 22 Mar 2004 23:59:25 +0000 Subject: [PATCH] root corrections to miracle git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@230 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/mlt_frame.c | 1 + src/miracle/miracle_commands.c | 2 +- src/miracle/miracle_unit_commands.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 1f2f3d2..360ecb0 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -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 ) { diff --git a/src/miracle/miracle_commands.c b/src/miracle/miracle_commands.c index 4bb0df3..178f7f9 100644 --- a/src/miracle/miracle_commands.c +++ b/src/miracle/miracle_commands.c @@ -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'; diff --git a/src/miracle/miracle_unit_commands.c b/src/miracle/miracle_unit_commands.c index af242a4..f190429 100644 --- a/src/miracle/miracle_unit_commands.c +++ b/src/miracle/miracle_unit_commands.c @@ -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 ); -- 1.7.4.4