Commit 466b938e authored by Steve Lhomme's avatar Steve Lhomme

mkvalidator: More detailed error messages

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@750 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent f658df91
2011-06-xx
version 0.3.5:
- More detailed error messages
2011-04-03
version 0.3.4:
- FlagForced, BlockVirtual and Slices should not be found multiple times at their level
......
......@@ -184,7 +184,7 @@ static filepos_t CheckUnknownElements(ebml_element *Elt)
{
EBML_ElementGetName(Elt,String,TSIZEOF(String));
EBML_IdToString(IdStr,TSIZEOF(IdStr),EBML_ElementClassID(SubElt));
OutputError(12,T("Unknown element in %s %s at %") TPRId64 T(" (size %") TPRId64 T(")"),String,IdStr,EL_Pos(SubElt),EL_DataSize(SubElt));
OutputError(12,T("Unknown element in %s %s at %") TPRId64 T(" (size %") TPRId64 T(" total %") TPRId64 T(")"),String,IdStr,EL_Pos(SubElt),EL_DataSize(SubElt), EBML_ElementFullSize(SubElt, 0));
}
else if (Node_IsPartOf(SubElt,EBML_VOID_CLASS))
{
......@@ -404,11 +404,11 @@ struct profile_check
static bool_t ProfileCallback(struct profile_check *check, int type, const tchar_t *ClassName, const ebml_element* Elt)
{
if (type==MASTER_CHECK_PROFILE_INVALID)
*check->Result |= OutputError(0x201,T("Invalid %s for profile '%s' in %s at %") TPRId64,ClassName,GetProfileName(check->ProfileMask),check->EltName,EL_Pos(check->Parent));
*check->Result |= OutputError(0x201,T("Invalid '%s' for profile '%s' in %s at %") TPRId64,ClassName,GetProfileName(check->ProfileMask),check->EltName,EL_Pos(check->Parent));
else if (type==MASTER_CHECK_MISSING_MANDATORY)
*check->Result |= OutputError(0x200,T("Missing element %s in %s at %") TPRId64, ClassName,check->EltName,EL_Pos(check->Parent));
*check->Result |= OutputError(0x200,T("Missing element '%s' in %s at %") TPRId64, ClassName,check->EltName,EL_Pos(check->Parent));
else if (type==MASTER_CHECK_MULTIPLE_UNIQUE)
*check->Result |= OutputError(0x202,T("Unique element %s in %s at %") TPRId64 T(" found more than once"), ClassName,check->EltName,EL_Pos(check->Parent));
*check->Result |= OutputError(0x202,T("Unique element '%s' in %s at %") TPRId64 T(" found more than once at %") TPRId64, ClassName,check->EltName,EL_Pos(check->Parent),EL_Pos(Elt));
return 0; // don't remove anything
}
......@@ -624,7 +624,7 @@ static int CheckVideoStart()
{
BlockNum = MATROSKA_BlockTrackNum((matroska_block*)GBlock);
if (BlockNum > ARRAYCOUNT(TrackKeyframe,bool_t))
OutputError(0xC3,T("Unknown track #%d in Cluster at %") TPRId64,(int)BlockNum,EL_Pos(*Cluster));
OutputError(0xC3,T("Unknown track #%d in Cluster at %") TPRId64 T(" in Block at %") TPRId64,(int)BlockNum,EL_Pos(*Cluster),EL_Pos(GBlock));
else if (MATROSKA_BlockKeyframe((matroska_block*)GBlock))
ARRAYBEGIN(TrackKeyframe,bool_t)[BlockNum] = 1;
else if (!ARRAYBEGIN(TrackKeyframe,bool_t)[BlockNum] && TrackIsVideo(BlockNum))
......@@ -640,7 +640,7 @@ static int CheckVideoStart()
{
BlockNum = MATROSKA_BlockTrackNum((matroska_block*)Block);
if (BlockNum > ARRAYCOUNT(TrackKeyframe,bool_t))
OutputError(0xC3,T("Unknown track #%d in Cluster at %") TPRId64,(int)BlockNum,EL_Pos(*Cluster));
OutputError(0xC3,T("Unknown track #%d in Cluster at %") TPRId64 T(" in SimpleBlock at %") TPRId64,(int)BlockNum,EL_Pos(*Cluster),EL_Pos(Block));
else if (MATROSKA_BlockKeyframe((matroska_block*)Block))
ARRAYBEGIN(TrackKeyframe,bool_t)[BlockNum] = 1;
else if (!ARRAYBEGIN(TrackKeyframe,bool_t)[BlockNum] && TrackIsVideo(BlockNum))
......
CON mkvalidator
{
PROJECT_NAME "mkvalidator"
PROJECT_VERSION 0.3.4
PROJECT_VERSION 0.3.5
PROJECT_VENDOR "Matroska"
USE matroska2
SOURCE mkvalidator.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment