Improve some notification when parsing Matroska files

This commit is contained in:
Martchus 2017-09-14 18:18:26 +02:00
parent ce92665848
commit a71ffd3fc5
2 changed files with 3 additions and 3 deletions

View File

@ -87,13 +87,13 @@ void EbmlElement::internalParse()
} }
if(m_idLength > GenericFileElement<implementationType>::maximumIdLengthSupported()) { if(m_idLength > GenericFileElement<implementationType>::maximumIdLengthSupported()) {
if(!skipped) { if(!skipped) {
addNotification(NotificationType::Critical, "EBML ID length is not supported, trying to skip.", context); addNotification(NotificationType::Critical, argsToString("EBML ID length at ", startOffset(), " is not supported, trying to skip."), context);
} }
continue; // try again continue; // try again
} }
if(m_idLength > container().maxIdLength()) { if(m_idLength > container().maxIdLength()) {
if(!skipped) { if(!skipped) {
addNotification(NotificationType::Critical, "EBML ID length is invalid.", context); addNotification(NotificationType::Critical, argsToString("EBML ID length at ", startOffset(), " is invalid, trying to skip."), context);
} }
continue; // try again continue; // try again
} }

View File

@ -113,7 +113,7 @@ void MatroskaTagField::reparse(EbmlElement &simpleTagElement, bool parseNestedFi
case EbmlIds::Void: case EbmlIds::Void:
break; break;
default: default:
addNotification(NotificationType::Warning, "\"SimpleTag\"-element contains unknown element. It will be ignored.", context); addNotification(NotificationType::Warning, argsToString("\"SimpleTag\"-element contains unknown element ", child->idToString(), " at ", child->startOffset(), ". It will be ignored."), context);
} }
child = child->nextSibling(); child = child->nextSibling();
} }