X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_properties.c;h=4e3f22bd505d3495f162f62f4dd6e8838b5c81bc;hb=1664eeeaf8535e2b65f8715fc8ebd09c941fdee8;hp=168aff4b0c156b233049cde2f6652c5280e23506;hpb=d5338ba9fdcb7647c7484829f5424a70dbfbb53e;p=melted diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 168aff4..4e3f22b 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -413,8 +413,8 @@ int mlt_properties_set( mlt_properties this, const char *name, const char *value } else if ( value[ 0 ] == '@' ) { - int total = 0; - int current = 0; + double total = 0; + double current = 0; char id[ 255 ]; char op = '+'; @@ -433,7 +433,7 @@ int mlt_properties_set( mlt_properties this, const char *name, const char *value if ( isdigit( id[ 0 ] ) ) current = atof( id ); else - current = mlt_properties_get_int( this, id ); + current = mlt_properties_get_double( this, id ); // Apply the operation switch( op ) @@ -448,7 +448,7 @@ int mlt_properties_set( mlt_properties this, const char *name, const char *value total *= current; break; case '/': - total /= current; + total = total / current; break; } @@ -456,7 +456,7 @@ int mlt_properties_set( mlt_properties this, const char *name, const char *value op = *value != '\0' ? *value ++ : ' '; } - error = mlt_property_set_int( property, total ); + error = mlt_property_set_double( property, total ); mlt_properties_do_mirror( this, name ); }