]> git.sesse.net Git - mlt/commitdiff
Do not serialize tractor in/out if unset.
authorDan Dennedy <dan@dennedy.org>
Sat, 28 Dec 2013 02:56:00 +0000 (18:56 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 28 Dec 2013 02:56:00 +0000 (18:56 -0800)
src/modules/xml/consumer_xml.c

index 77226db00eb6390676d0259ff35a383853eb33e2..01a34de34702cebd8000a94217864c6cd4b0117f 100644 (file)
@@ -527,8 +527,10 @@ static void serialise_tractor( serialise_context context, mlt_service service, x
                        xmlNewProp( child, _x("title"), _x(mlt_properties_get( properties, "title" )) );
                if ( mlt_properties_get( properties, "global_feed" ) )
                        xmlNewProp( child, _x("global_feed"), _x(mlt_properties_get( properties, "global_feed" )) );
-               xmlNewProp( child, _x("in"), _x(mlt_properties_get_time( properties, "in", context->time_format )) );
-               xmlNewProp( child, _x("out"), _x(mlt_properties_get_time( properties, "out", context->time_format )) );
+               if ( mlt_properties_get_position( properties, "in" ) >= 0 )
+                       xmlNewProp( child, _x("in"), _x(mlt_properties_get_time( properties, "in", context->time_format )) );
+               if ( mlt_properties_get_position( properties, "out" ) >= 0 )
+                       xmlNewProp( child, _x("out"), _x(mlt_properties_get_time( properties, "out", context->time_format )) );
 
                // Store application specific properties
                serialise_store_properties( context, MLT_SERVICE_PROPERTIES( service ), child, context->store );