From 5730164c9f8f4bc3e7d7ad0abdbd809056fbba28 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sun, 10 Jul 2011 21:44:51 -0700 Subject: [PATCH] Ensure serialized yaml is LC_NUMERIC=C. This is needed to ensure consistency. The metadata is read as string data and converted to numbers on demand. This is why loading defaults to C locale - since they were authored with that in mind. However, some plugins dynamically generate metadata and may set values with int or double. Therefore, we need to make it all output consistently, and for now that means C. --- src/framework/mlt_properties.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 8bab269b..810de35b 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -1908,9 +1908,12 @@ static void serialise_yaml( mlt_properties self, strbuf output, int indent, int char *mlt_properties_serialise_yaml( mlt_properties self ) { + const char *lc_numeric = mlt_properties_get_lcnumeric( self ); strbuf b = strbuf_new(); strbuf_printf( b, "---\n" ); + mlt_properties_set_lcnumeric( self, "C" ); serialise_yaml( self, b, 0, 0 ); + mlt_properties_set_lcnumeric( self, lc_numeric ); strbuf_printf( b, "...\n" ); char *ret = b->string; strbuf_close( b ); -- 2.39.5