From: Dan Dennedy Date: Thu, 14 Oct 2010 05:42:33 +0000 (-0700) Subject: Do not serialize profile when consumer profile is null. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f2e4fe949449826f97f377e5724203da268b99fc;p=mlt Do not serialize profile when consumer profile is null. --- 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 );