diff --git a/source/XMPFiles/FormatSupport/QuickTime_Support.cpp b/source/XMPFiles/FormatSupport/QuickTime_Support.cpp
index 9eb2e15..945f5fe 100644
--- a/source/XMPFiles/FormatSupport/QuickTime_Support.cpp
+++ b/source/XMPFiles/FormatSupport/QuickTime_Support.cpp
@@ -201,7 +201,7 @@ static const XMP_Uns16 kMacLangToScript_128_151 [24] = {
 
 	/* langAzerbaijanRoman (150) */		smRoman,
 	/* langNynorsk (151) */				smRoman
-	
+
 };	// kMacLangToScript_128_151
 
 // -------------------------------------------------------------------------------------------------
@@ -344,7 +344,7 @@ static const char * kMacToXMPLang_128_151 [24] = {
 
 	/* langAzerbaijanRoman (150) */		"az",
 	/* langNynorsk (151) */				"nn"
-	
+
 };	// kMacToXMPLang_128_151
 
 // -------------------------------------------------------------------------------------------------
@@ -506,15 +506,15 @@ static UINT kMacToWinCP_0_94 [95] = {
 static XMP_Uns16 GetMacScript ( XMP_Uns16 macLang )
 {
 	XMP_Uns16 macScript = kNoMacScript;
-	
+
 	if ( macLang <= 94 ) {
 		macScript = kMacLangToScript_0_94[macLang];
 	} else if ( (128 <= macLang) && (macLang <= 151) ) {
 		macScript = kMacLangToScript_0_94[macLang-128];
 	}
-	
+
 	return macScript;
-	
+
 }	// GetMacScript
 
 // =================================================================================================
@@ -526,16 +526,16 @@ static XMP_Uns16 GetMacScript ( XMP_Uns16 macLang )
 static UINT GetWinCP ( XMP_Uns16 macLang )
 {
 	UINT winCP = 0;
-	
+
 	if ( macLang <= 94 ) winCP = kMacToWinCP_0_94[macLang];
-	
+
 	if ( winCP == 0 ) {
 		XMP_Uns16 macScript = GetMacScript ( macLang );
 		if ( macScript != kNoMacScript ) winCP = kMacScriptToWinCP[macScript];
 	}
-	
+
 	return winCP;
-	
+
 }	// GetWinCP
 
 #endif
@@ -547,15 +547,15 @@ static UINT GetWinCP ( XMP_Uns16 macLang )
 static XMP_StringPtr GetXMPLang ( XMP_Uns16 macLang )
 {
 	XMP_StringPtr xmpLang = "";
-	
+
 	if ( macLang <= 94 ) {
 		xmpLang = kMacToXMPLang_0_94[macLang];
 	} else if ( (128 <= macLang) && (macLang <= 151) ) {
 		xmpLang = kMacToXMPLang_128_151[macLang-128];
 	}
-	
+
 	return xmpLang;
-	
+
 }	// GetXMPLang
 
 // =================================================================================================
@@ -565,20 +565,20 @@ static XMP_StringPtr GetXMPLang ( XMP_Uns16 macLang )
 static XMP_Uns16 GetMacLang ( std::string * xmpLang )
 {
 	if ( *xmpLang == "" ) return kNoMacLang;
-	
+
 	size_t hyphenPos = xmpLang->find ( '-' );	// Make sure the XMP language is "generic".
 	if ( hyphenPos != std::string::npos ) xmpLang->erase ( hyphenPos );
-	
+
 	for ( XMP_Uns16 i = 0; i <= 94; ++i ) {	// Using std::map would be faster.
 		if ( *xmpLang == kMacToXMPLang_0_94[i] ) return i;
 	}
-	
+
 	for ( XMP_Uns16 i = 128; i <= 151; ++i ) {	// Using std::map would be faster.
 		if ( *xmpLang == kMacToXMPLang_128_151[i-128] ) return i;
 	}
-	
+
 	return kNoMacLang;
-	
+
 }	// GetMacLang
 
 // =================================================================================================
@@ -588,7 +588,7 @@ static XMP_Uns16 GetMacLang ( std::string * xmpLang )
 static void MacRomanToUTF8 ( const std::string & macRoman, std::string * utf8 )
 {
 	utf8->erase();
-	
+
 	for ( XMP_Uns8* chPtr = (XMP_Uns8*)macRoman.c_str(); *chPtr != 0; ++chPtr ) {	// ! Don't trust that char is unsigned.
 		if ( *chPtr < 0x80 ) {
 			(*utf8) += (char)*chPtr;
@@ -607,7 +607,7 @@ static void UTF8ToMacRoman ( const std::string & utf8, std::string * macRoman )
 {
 	macRoman->erase();
 	bool inNonMRSpan = false;
-	
+
 	for ( const XMP_Uns8 * chPtr = (XMP_Uns8*)utf8.c_str(); *chPtr != 0; ++chPtr ) {	// ! Don't trust that char is unsigned.
 		if ( *chPtr < 0x80 ) {
 			(*macRoman) += (char)*chPtr;
@@ -643,7 +643,7 @@ static inline bool IsMacLangKnown ( XMP_Uns16 macLang )
 	#elif XMP_WinBuild
 		if ( GetWinCP(macLang) == 0 ) return false;
 	#endif
-	
+
 	return true;
 
 }	// IsMacLangKnown
@@ -667,7 +667,7 @@ bool ConvertToMacLang ( const std::string & utf8Value, XMP_Uns16 macLang, std::s
 		UINT winCP = GetWinCP ( macLang );
 		ReconcileUtils::UTF8ToWinEncoding ( winCP, (XMP_Uns8*)utf8Value.c_str(), utf8Value.size(), macValue );
 	#endif
-	
+
 	return true;
 
 }	// ConvertToMacLang
@@ -680,7 +680,7 @@ bool ConvertFromMacLang ( const std::string & macValue, XMP_Uns16 macLang, std::
 {
 	utf8Value->erase();
 	if ( ! IsMacLangKnown ( macLang ) ) return false;
-	
+
 	#if XMP_MacBuild
 		XMP_Uns16 macScript = GetMacScript ( macLang );
 		ReconcileUtils::MacEncodingToUTF8 ( macScript, macLang, (XMP_Uns8*)macValue.c_str(), macValue.size(), utf8Value );
@@ -690,7 +690,7 @@ bool ConvertFromMacLang ( const std::string & macValue, XMP_Uns16 macLang, std::
 		UINT winCP = GetWinCP ( macLang );
 		ReconcileUtils::WinEncodingToUTF8 ( winCP, (XMP_Uns8*)macValue.c_str(), macValue.size(), utf8Value );
 	#endif
-	
+
 	return true;
 
 }	// ConvertFromMacLang
@@ -724,11 +724,11 @@ bool TradQT_Manager::ParseCachedBoxes ( const MOOV_Manager & moovMgr )
 		if ( currRef == 0 ) break;	// Sanity check, should not happen.
 		if ( (currInfo.boxType >> 24) != 0xA9 ) continue;
 		if ( currInfo.contentSize < 2+2+1 ) continue;	// Want enough for a non-empty value.
-		
+
 		InfoMapPos newInfo = this->parsedBoxes.insert ( this->parsedBoxes.end(),
 														InfoMap::value_type ( currInfo.boxType, ParsedBoxInfo ( currInfo.boxType ) ) );
 		std::vector<ValueInfo> * newValues = &newInfo->second.values;
-		
+
 		XMP_Uns8 * boxPtr = (XMP_Uns8*) currInfo.content;
 		XMP_Uns8 * boxEnd = boxPtr + currInfo.contentSize;
 		XMP_Uns16 miniLen, macLang;
@@ -737,16 +737,16 @@ bool TradQT_Manager::ParseCachedBoxes ( const MOOV_Manager & moovMgr )
 
 			miniLen = 4 + GetUns16BE ( boxPtr );	// ! Include header in local miniLen.
 			macLang  = GetUns16BE ( boxPtr+2);
-			if ( (miniLen <= 4) || (miniLen > (boxEnd - boxPtr)) ) continue;	// Ignore bad or empty values.
-			
+			if ( (miniLen <= 4) || (miniLen > (boxEnd - boxPtr)) ) break;	// Ignore bad or empty values.
+
 			XMP_StringPtr valuePtr = (char*)(boxPtr+4);
 			size_t valueLen = miniLen - 4;
 
 			newValues->push_back ( ValueInfo() );
 			ValueInfo * newValue = &newValues->back();
-			
+
 			// Only set the XMP language if the Mac script is known, i.e. the value can be converted.
-			
+
 			newValue->macLang = macLang;
 			if ( IsMacLangKnown ( macLang ) ) newValue->xmpLang = GetXMPLang ( macLang );
 			newValue->macValue.assign ( valuePtr, valueLen );
@@ -754,7 +754,7 @@ bool TradQT_Manager::ParseCachedBoxes ( const MOOV_Manager & moovMgr )
 		}
 
 	}
-	
+
 	return (! this->parsedBoxes.empty());
 
 }	// TradQT_Manager::ParseCachedBoxes
@@ -773,34 +773,34 @@ bool TradQT_Manager::ImportSimpleXMP ( XMP_Uns32 id, SXMPMeta * xmp, XMP_StringP
 		InfoMapCPos infoPos = this->parsedBoxes.find ( id );
 		if ( infoPos == this->parsedBoxes.end() ) return false;
 		if ( infoPos->second.values.empty() ) return false;
-		
+
 		std::string xmpValue, tempValue;
 		XMP_OptionBits flags;
 		bool xmpExists = xmp->GetProperty ( ns, prop, &xmpValue, &flags );
 		if ( xmpExists && (! XMP_PropIsSimple ( flags )) ) {
 			XMP_Throw ( "TradQT_Manager::ImportSimpleXMP - XMP property must be simple", kXMPErr_BadParam );
 		}
-		
+
 		bool convertOK;
 		const ValueInfo & qtItem = infoPos->second.values[0];	// ! Use the first QT entry.
-	
+
 		if ( xmpExists ) {
 			convertOK = ConvertToMacLang ( xmpValue, qtItem.macLang, &tempValue );
 			if ( ! convertOK ) return false;	// throw?
 			if ( tempValue == qtItem.macValue ) return false;	// QT value matches back converted XMP value.
 		}
-	
+
 		convertOK = ConvertFromMacLang ( qtItem.macValue, qtItem.macLang, &tempValue );
 		if ( ! convertOK ) return false;	// throw?
 		xmp->SetProperty ( ns, prop, tempValue.c_str() );
 		return true;
-	
+
 	} catch ( ... ) {
 
-		return false;	// Don't let one failure abort other imports.	
-	
+		return false;	// Don't let one failure abort other imports.
+
 	}
-		
+
 }	// TradQT_Manager::ImportSimpleXMP
 
 // =================================================================================================
@@ -823,7 +823,7 @@ bool TradQT_Manager::ImportLangItem ( const ValueInfo & qtItem, SXMPMeta * xmp,
 			genericLang  = "";
 			specificLang = "x-default";
 		}
-	
+
 		bool convertOK;
 		std::string xmpValue, tempValue, actualLang;
 		bool xmpExists = xmp->GetLocalizedText ( ns, langArray, genericLang, specificLang, &actualLang, &xmpValue, 0 );
@@ -833,16 +833,16 @@ bool TradQT_Manager::ImportLangItem ( const ValueInfo & qtItem, SXMPMeta * xmp,
 			if ( tempValue == qtItem.macValue ) return true;	// QT value matches back converted XMP value.
 			specificLang = actualLang.c_str();
 		}
-	
+
 		convertOK = ConvertFromMacLang ( qtItem.macValue, qtItem.macLang, &tempValue );
 		if ( ! convertOK ) return false;	// throw?
 		xmp->SetLocalizedText ( ns, langArray, "", specificLang, tempValue.c_str() );
 		return true;
-	
+
 	} catch ( ... ) {
 
-		return false;	// Don't let one failure abort other imports.	
-	
+		return false;	// Don't let one failure abort other imports.
+
 	}
 
 }	// TradQT_Manager::ImportLangItem
@@ -861,7 +861,7 @@ bool TradQT_Manager::ImportLangAltXMP ( XMP_Uns32 id, SXMPMeta * xmp, XMP_String
 		InfoMapCPos infoPos = this->parsedBoxes.find ( id );
 		if ( infoPos == this->parsedBoxes.end() ) return false;
 		if ( infoPos->second.values.empty() ) return false;	// Quit now if there are no values.
-		
+
 		XMP_OptionBits flags;
 		bool xmpExists = xmp->GetProperty ( ns, langArray, 0, &flags );
 		if ( ! xmpExists ) {
@@ -869,29 +869,29 @@ bool TradQT_Manager::ImportLangAltXMP ( XMP_Uns32 id, SXMPMeta * xmp, XMP_String
 		} else if ( ! XMP_ArrayIsAltText ( flags ) ) {
 			XMP_Throw ( "TradQT_Manager::ImportLangAltXMP - XMP array must be AltText", kXMPErr_BadParam );
 		}
-	
+
 		// Process all of the QT values, looking up the appropriate XMP language for each.
-		
+
 		bool haveMappings = false;
 		const ValueVector & qtValues = infoPos->second.values;
-		
+
 		for ( size_t i = 0, limit = qtValues.size(); i < limit; ++i ) {
 			const ValueInfo & qtItem = qtValues[i];
 			if ( *qtItem.xmpLang == 0 ) continue;	// Only do known mappings in the loop.
 			haveMappings |= this->ImportLangItem ( qtItem, xmp, ns, langArray );
 		}
-		
+
 		if ( ! haveMappings ) {
 			// If nothing mapped, process the first QT item to XMP's "x-default".
 			haveMappings = this->ImportLangItem ( qtValues[0], xmp, ns, langArray );	// ! No xmpLang implies "x-default".
 		}
-	
+
 		return haveMappings;
-	
+
 	} catch ( ... ) {
 
-		return false;	// Don't let one failure abort other imports.	
-	
+		return false;	// Don't let one failure abort other imports.
+
 	}
 
 }	// TradQT_Manager::ImportLangAltXMP
@@ -921,7 +921,7 @@ void TradQT_Manager::ExportSimpleXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_S
 		}
 		return;
 	}
-	
+
 	XMP_Assert ( xmpFound );
 	if ( ! qtFound ) {
 		if ( ! createWithZeroLang ) return;
@@ -934,16 +934,16 @@ void TradQT_Manager::ExportSimpleXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_S
 		newValue->xmpLang = kMacToXMPLang_0_94[0];
 		this->changed = infoPos->second.changed = true;
 	}
-		
+
 	ValueInfo * qtItem = &infoPos->second.values[0];	// ! Use the first QT entry.
 	if ( ! IsMacLangKnown ( qtItem->macLang ) ) return;
-	
+
 	bool convertOK = ConvertToMacLang ( xmpValue, qtItem->macLang, &macValue );
 	if ( convertOK && (macValue != qtItem->macValue) ) {
 		qtItem->macValue = macValue;
 		this->changed = infoPos->second.changed = true;
 	}
-	
+
 }	// TradQT_Manager::ExportSimpleXMP
 
 // =================================================================================================
@@ -961,10 +961,10 @@ void TradQT_Manager::ExportLangAltXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_
 
 	InfoMapPos infoPos = this->parsedBoxes.find ( id );
 	if ( infoPos == this->parsedBoxes.end() ) {
-		infoPos = this->parsedBoxes.insert ( this->parsedBoxes.end(), 
+		infoPos = this->parsedBoxes.insert ( this->parsedBoxes.end(),
 											 InfoMap::value_type ( id, ParsedBoxInfo ( id ) ) );
 	}
-	
+
 	ValueVector * qtValues = &infoPos->second.values;
 	XMP_Index xmpCount = xmp.CountArrayItems ( ns, langArray );
 	bool convertOK;
@@ -979,19 +979,19 @@ void TradQT_Manager::ExportLangAltXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_
 		}
 		return;
 	}
-	
+
 	// Go through the XMP and look for a related macLang QuickTime item to update or create.
-	
+
 	for ( XMP_Index xmpIndex = 1; xmpIndex <= xmpCount; ++xmpIndex ) {	// ! XMP index starts at 1!
 
 		SXMPUtils::ComposeArrayItemPath ( ns, langArray, xmpIndex, &xmpPath );
 		xmp.GetProperty ( ns, xmpPath.c_str(), &xmpValue, 0 );
 		xmp.GetQualifier ( ns, xmpPath.c_str(), kXMP_NS_XML, "lang", &xmpLang, 0 );
 		if ( xmpLang == "x-default" ) continue;
-		
+
 		XMP_Uns16 macLang = GetMacLang ( &xmpLang );
 		if ( macLang == kNoMacLang ) continue;
-		
+
 		size_t qtIndex, qtLimit;
 		for ( qtIndex = 0, qtLimit = qtValues->size(); qtIndex < qtLimit; ++qtIndex ) {
 			if ( (*qtValues)[qtIndex].macLang == macLang ) break;
@@ -1006,7 +1006,7 @@ void TradQT_Manager::ExportLangAltXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_
 			newItem->macLang = macLang;
 			newItem->xmpLang = GetXMPLang ( macLang );	// ! Use the 2 character root language.
 		}
-		
+
 		ValueInfo * qtItem = &((*qtValues)[qtIndex]);
 		qtItem->marked = true;	// Mark it whether updated or not, don't delete it in the next pass.
 
@@ -1019,7 +1019,7 @@ void TradQT_Manager::ExportLangAltXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_
 	}
 	this->changed |= haveMappings;
 	infoPos->second.changed |= haveMappings;
-	
+
 	// Go through the QuickTime items that are unmarked and delete those that have an xmpLang
 	// and known macScript. Clear all marks.
 
@@ -1032,17 +1032,17 @@ void TradQT_Manager::ExportLangAltXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_
 			this->changed = infoPos->second.changed = true;
 		}
 	}
-	
+
 	// If there were no mappings, export the XMP default item to the first QT item.
 
 	if ( (! haveMappings) && (! qtValues->empty()) ) {
-	
+
 		bool ok = xmp.GetLocalizedText ( ns, langArray, "", "x-default", 0, &xmpValue, 0 );
 		if ( ! ok ) return;
-		
+
 		ValueInfo * qtItem = &((*qtValues)[0]);
 		if ( ! IsMacLangKnown ( qtItem->macLang ) ) return;
-		
+
 		convertOK = ConvertToMacLang ( xmpValue, qtItem->macLang, &macValue );
 		if ( convertOK && (macValue != qtItem->macValue) ) {
 			qtItem->macValue.swap ( macValue );	// No need to make a copy.
@@ -1062,37 +1062,37 @@ void TradQT_Manager::UpdateChangedBoxes ( MOOV_Manager * moovMgr )
 	MOOV_Manager::BoxInfo udtaInfo;
 	MOOV_Manager::BoxRef  udtaRef = moovMgr->GetBox ( "moov/udta", &udtaInfo );
 	XMP_Assert ( (udtaRef != 0) || (udtaInfo.childCount == 0) );
-	
+
 	if ( udtaRef != 0 ) {	// Might not have been a moov/udta box in the parse.
 
 		// First go through the moov/udta/©... children and delete those that are not in the map.
-	
+
 		for ( XMP_Uns32 ordinal = udtaInfo.childCount; ordinal > 0; --ordinal ) {	// ! Go backwards because of deletions.
-	
+
 			MOOV_Manager::BoxInfo currInfo;
 			MOOV_Manager::BoxRef  currRef = moovMgr->GetNthChild ( udtaRef, (ordinal-1), &currInfo );
 			if ( currRef == 0 ) break;	// Sanity check, should not happen.
 			if ( (currInfo.boxType >> 24) != 0xA9 ) continue;
 			if ( currInfo.contentSize < 2+2+1 ) continue;	// These were skipped by ParseCachedBoxes.
-			
+
 			InfoMapPos infoPos = this->parsedBoxes.find ( currInfo.boxType );
 			if ( infoPos == this->parsedBoxes.end() ) moovMgr->DeleteNthChild ( udtaRef, (ordinal-1) );
-		
+
 		}
-	
+
 	}
-	
+
 	// Now go through the changed items in the map and update them in the moov/udta subtree.
-	
+
 	InfoMapCPos infoPos = this->parsedBoxes.begin();
 	InfoMapCPos infoEnd = this->parsedBoxes.end();
-	
+
 	for ( ; infoPos != infoEnd; ++infoPos ) {
 
 		ParsedBoxInfo * qtItem = (ParsedBoxInfo*) &infoPos->second;
 		if ( ! qtItem->changed ) continue;
 		qtItem->changed = false;
-		
+
 		XMP_Uns32 qtTotalSize = 0;	// Total size of the QT values, ignoring empty values.
 		for ( size_t i = 0, limit = qtItem->values.size(); i < limit; ++i ) {
 			if ( ! qtItem->values[i].macValue.empty() ) {
@@ -1100,25 +1100,25 @@ void TradQT_Manager::UpdateChangedBoxes ( MOOV_Manager * moovMgr )
 				qtTotalSize += (XMP_Uns32)(2+2 + qtItem->values[i].macValue.size());
 			}
 		}
-		
+
 		if ( udtaRef == 0 ) {	// Might not have been a moov/udta box in the parse.
 			moovMgr->SetBox ( "moov/udta", 0, 0 );
 			udtaRef = moovMgr->GetBox ( "moov/udta", &udtaInfo );
 			XMP_Assert ( udtaRef != 0 );
 		}
-		
+
 		if ( qtTotalSize == 0 ) {
-		
+
 			moovMgr->DeleteTypeChild ( udtaRef, qtItem->id );
-		
+
 		} else {
-		
+
 			// Compose the complete box content.
-			
+
 			RawDataBlock fullValue;
 			fullValue.assign ( qtTotalSize, 0 );
 			XMP_Uns8 * valuePtr = &fullValue[0];
-		
+
 			for ( size_t i = 0, limit = qtItem->values.size(); i < limit; ++i ) {
 				XMP_Assert ( qtItem->values[i].macValue.size() <= 0xFFFF );
 				XMP_Uns16 textSize = (XMP_Uns16)qtItem->values[i].macValue.size();
@@ -1127,18 +1127,18 @@ void TradQT_Manager::UpdateChangedBoxes ( MOOV_Manager * moovMgr )
 				PutUns16BE ( qtItem->values[i].macLang, valuePtr );					valuePtr += 2;
 				memcpy ( valuePtr, qtItem->values[i].macValue.c_str(), textSize );	valuePtr += textSize;
 			}
-			
+
 			// Look for an existing box to update, else add a new one.
 
 			MOOV_Manager::BoxInfo itemInfo;
 			MOOV_Manager::BoxRef  itemRef = moovMgr->GetTypeChild ( udtaRef, qtItem->id, &itemInfo );
-			
+
 			if ( itemRef != 0 ) {
 				moovMgr->SetBox ( itemRef, &fullValue[0], qtTotalSize );
 			} else {
 				moovMgr->AddChildBox ( udtaRef, qtItem->id, &fullValue[0], qtTotalSize );
 			}
-			
+
 		}
 
 	}
