From 3ef0cb2583cc1bab8256a8512bc740d56ced7b93 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Fri, 27 Dec 2013 18:56:00 -0800 Subject: [PATCH 1/1] Do not serialize tractor in/out if unset. --- src/modules/xml/consumer_xml.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/xml/consumer_xml.c b/src/modules/xml/consumer_xml.c index 77226db0..01a34de3 100644 --- a/src/modules/xml/consumer_xml.c +++ b/src/modules/xml/consumer_xml.c @@ -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 ); -- 2.39.5