From a71ffd3fc58bee4a89cf6ceb283677b07cc898fe Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 14 Sep 2017 18:18:26 +0200 Subject: [PATCH] Improve some notification when parsing Matroska files --- matroska/ebmlelement.cpp | 4 ++-- matroska/matroskatagfield.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/matroska/ebmlelement.cpp b/matroska/ebmlelement.cpp index 5c825c0..0138e72 100644 --- a/matroska/ebmlelement.cpp +++ b/matroska/ebmlelement.cpp @@ -87,13 +87,13 @@ void EbmlElement::internalParse() } if(m_idLength > GenericFileElement::maximumIdLengthSupported()) { 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 } if(m_idLength > container().maxIdLength()) { 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 } diff --git a/matroska/matroskatagfield.cpp b/matroska/matroskatagfield.cpp index 95e57fb..c803db2 100644 --- a/matroska/matroskatagfield.cpp +++ b/matroska/matroskatagfield.cpp @@ -113,7 +113,7 @@ void MatroskaTagField::reparse(EbmlElement &simpleTagElement, bool parseNestedFi case EbmlIds::Void: break; 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(); }