]> git.sesse.net Git - mlt/commitdiff
Make frei0r version metadata support locale.
authorDan Dennedy <dan@dennedy.org>
Sat, 9 Jul 2011 15:52:21 +0000 (08:52 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 9 Jul 2011 19:38:07 +0000 (12:38 -0700)
Patch by j-b-m

src/modules/frei0r/factory.c

index b7eab53356e2f2c59cc2b221fe00d3d8dec8c8c9..49fa9ad31360af7c2d2e13160ad12adf6a3543fb 100644 (file)
@@ -29,6 +29,7 @@
 #include <dlfcn.h>
 #include <stdlib.h>
 #include <limits.h>
+#include <math.h>
 
 
 #ifdef WIN32
@@ -111,10 +112,11 @@ static mlt_properties fill_param_info ( mlt_service_type type, const char *servi
 
        f0r_init();
        plginfo(&info);
-       snprintf ( string, sizeof(string) , "%d.%d" , info.major_version , info.minor_version );
-       mlt_properties_set ( metadata, "schema_version" , "0.1" );
+       snprintf ( string, sizeof(string) , "%d" , info.minor_version );
+       mlt_properties_set_double ( metadata, "schema_version" , 0.1 );
        mlt_properties_set ( metadata, "title" , info.name );
-       mlt_properties_set ( metadata, "version", string );
+       mlt_properties_set_double ( metadata, "version",
+               info.major_version +  info.minor_version / pow( 10, strlen( string ) ) );
        mlt_properties_set ( metadata, "identifier" , service_name );
        mlt_properties_set ( metadata, "description" , info.explanation );
        mlt_properties_set ( metadata, "creator" , info.author );