From f2e4fe949449826f97f377e5724203da268b99fc Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Wed, 13 Oct 2010 22:42:33 -0700 Subject: [PATCH] Do not serialize profile when consumer profile is null. --- src/modules/xml/consumer_xml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/xml/consumer_xml.c b/src/modules/xml/consumer_xml.c index 41c8b428..3b96cfef 100644 --- a/src/modules/xml/consumer_xml.c +++ b/src/modules/xml/consumer_xml.c @@ -630,8 +630,7 @@ xmlDocPtr xml_make_doc( mlt_consumer consumer, mlt_service service ) xmlDocPtr doc = xmlNewDoc( _x("1.0") ); xmlNodePtr root = xmlNewNode( NULL, _x("mlt") ); struct serialise_context_s *context = calloc( 1, sizeof( struct serialise_context_s ) ); - xmlNodePtr profile_node = xmlNewChild( root, NULL, _x("profile"), NULL ); - mlt_profile profile = mlt_service_profile( service ); + mlt_profile profile = mlt_service_profile( MLT_CONSUMER_SERVICE( consumer ) ); char tmpstr[ 32 ]; xmlDocSetRootElement( doc, root ); @@ -658,6 +657,7 @@ xmlDocPtr xml_make_doc( mlt_consumer consumer, mlt_service service ) // Add a profile child element if ( profile ) { + xmlNodePtr profile_node = xmlNewChild( root, NULL, _x("profile"), NULL ); if ( profile->description ) xmlNewProp( profile_node, _x("description"), _x(profile->description) ); sprintf( tmpstr, "%d", profile->width ); -- 2.39.2