Commit 69c3a15e authored by Steve Lhomme's avatar Steve Lhomme

libebml2: hide the internal structures for code that don't override the classes

libmatroska2: hide the internal structures for code that don't override the classes
libebml2: add EBML_MasterCheckContext() to check profile/context conformance of an EBML master, reporting errors in a callback

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@611 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 0e72c7b4
......@@ -85,26 +85,13 @@ typedef struct ebml_semantic ebml_semantic;
typedef struct ebml_element ebml_element;
typedef struct ebml_crc ebml_crc;
struct ebml_semantic
{
bool_t Mandatory;
bool_t Unique;
const ebml_context *eClass;
int DisabledProfile; // PROFILE_MATROSKA_V1 and others
};
struct ebml_context
{
fourcc_t Id;
fourcc_t Class; // TODO: store a pointer to make creation faster
bool_t HasDefault;
intptr_t DefaultValue;
const char *ElementName;
// TODO: create sub class so we don't have to assign it all the time
const ebml_semantic *Semantic; // table with last element class set to NULL
const ebml_semantic *GlobalContext; // table with last element class set to NULL
void (*PostCreate)(ebml_element *p, const void *Cookie);
};
typedef struct ebml_master ebml_master;
typedef struct ebml_integer ebml_integer;
typedef struct ebml_string ebml_string;
typedef struct ebml_binary ebml_binary;
typedef struct ebml_integer ebml_date;
typedef struct ebml_float ebml_float;
typedef struct ebml_dummy ebml_dummy;
struct ebml_parser_context
{
......@@ -113,20 +100,6 @@ struct ebml_parser_context
filepos_t EndPosition;
};
struct ebml_element
{
nodetree Base;
filepos_t DataSize; // size of the data inside the element
filepos_t ElementPosition;
filepos_t SizePosition; // TODO: is this needed since we have the ElementPosition and SizeLength ?
const ebml_context *Context;
int DefaultSize;
int8_t SizeLength;
boolmem_t bValueIsSet;
boolmem_t bDefaultIsSet;
boolmem_t bNeedDataSizeUpdate;
};
typedef struct ebml_element_vmt
{
nodetree_vmt Base;
......@@ -156,50 +129,6 @@ typedef struct ebml_element_vmt
#define EBML_ElementCmp(p,e) VMT_FUNC(p,ebml_element_vmt)->Cmp(p,e)
#define EBML_ElementCopy(p,c) VMT_FUNC(p,ebml_element_vmt)->Copy(p,c)
typedef struct ebml_master
{
ebml_element Base;
int CheckSumStatus; // 0: not set, 1: requested/invalid, 2: verified
} ebml_master;
typedef struct ebml_string
{
ebml_element Base;
const char *Buffer; // UTF-8 internal storage
} ebml_string;
typedef struct ebml_integer
{
ebml_element Base;
int64_t Value;
} ebml_integer;
typedef struct ebml_float
{
ebml_element Base;
double Value;
} ebml_float;
typedef struct ebml_binary
{
ebml_element Base;
array Data;
} ebml_binary;
typedef ebml_integer ebml_date;
typedef struct ebml_dummy
{
ebml_binary Base;
ebml_context DummyContext;
} ebml_dummy;
EBML_DLL err_t EBML_Init(nodecontext *p);
EBML_DLL err_t EBML_Done(nodecontext *p);
......@@ -292,7 +221,12 @@ EBML_DLL size_t EBML_FillBufferID(uint8_t *Buffer, size_t BufSize, fourcc_t Id);
EBML_DLL size_t EBML_IdToString(tchar_t *Out, size_t OutLen, fourcc_t Id);
EBML_DLL fourcc_t EBML_BufferToID(const uint8_t *Buffer);
INTERNAL_C_API size_t GetIdLength(fourcc_t Id);
#define MASTER_CHECK_PROFILE_INVALID 0
#define MASTER_CHECK_MISSING_MANDATORY 1
#define MASTER_CHECK_MULTIPLE_UNIQUE 2
typedef bool_t (*ContextCallback)(void *cookie, int type, const tchar_t *ClassName, const ebml_element*);
EBML_DLL void EBML_MasterCheckContext(ebml_master *Element, int ProfileMask, ContextCallback callback, void *cookie);
#if defined(EBML_LEGACY_API)
#define CONTEXT_CONST
......
/*
* $Id$
* Copyright (c) 2010, Matroska Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Matroska Foundation nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY The Matroska Foundation ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL The Matroska Foundation BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBEBML2_INTERNAL_H
#define LIBEBML2_INTERNAL_H
/*
* ONLY INCLUDE THIS FILE IF YOU PLAN TO CREATE YOUR OWN EBML-BASED CLASS
*/
#include "node/node.h"
#ifdef __cplusplus
extern "C" {
#endif
INTERNAL_C_API size_t GetIdLength(fourcc_t Id);
struct ebml_semantic
{
bool_t Mandatory;
bool_t Unique;
const ebml_context *eClass;
int DisabledProfile; // PROFILE_MATROSKA_V1 and others
};
struct ebml_context
{
fourcc_t Id;
fourcc_t Class; // TODO: store a pointer to make creation faster
bool_t HasDefault;
intptr_t DefaultValue;
const char *ElementName;
// TODO: create sub class so we don't have to assign it all the time
const ebml_semantic *Semantic; // table with last element class set to NULL
const ebml_semantic *GlobalContext; // table with last element class set to NULL
void (*PostCreate)(ebml_element *p, const void *Cookie);
};
struct ebml_element
{
nodetree Base;
filepos_t DataSize; // size of the data inside the element
filepos_t ElementPosition;
filepos_t SizePosition; // TODO: is this needed since we have the ElementPosition and SizeLength ?
const ebml_context *Context;
int DefaultSize;
int8_t SizeLength;
boolmem_t bValueIsSet;
boolmem_t bDefaultIsSet;
boolmem_t bNeedDataSizeUpdate;
//boolmem_t bSizeWithDefault; // whether the size is valid when default values are not written
};
struct ebml_master
{
ebml_element Base;
int CheckSumStatus; // 0: not set, 1: requested/invalid, 2: verified
};
struct ebml_string
{
ebml_element Base;
const char *Buffer; // UTF-8 internal storage
};
struct ebml_integer
{
ebml_element Base;
int64_t Value;
};
struct ebml_float
{
ebml_element Base;
double Value;
};
struct ebml_binary
{
ebml_element Base;
array Data;
};
struct ebml_dummy
{
ebml_binary Base;
ebml_context DummyContext;
};
#ifdef __cplusplus
}
#endif
#endif /* LIBEBML2_INTERNAL_H */
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
static err_t ReadData(ebml_binary *Element, stream *Input, const ebml_parser_context *ParserContext, bool_t AllowDummyElt, int Scope, size_t DepthCheckCRC)
{
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
struct ebml_crc
{
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
datetime_t EBML_DateTime(const ebml_date *Element)
{
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
static bool_t ValidateSize(const ebml_element *p)
{
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
#if defined(EBML_LIBRARY)
# if defined(EBML_LEGACY_API)
# include "ebml2_legacy_project.h"
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
#include "ebmlcrc.h"
ebml_element *EBML_MasterAddElt(ebml_master *Element, const ebml_context *Context, bool_t SetDefault)
......@@ -553,3 +554,55 @@ META_VMT(TYPE_FUNC,ebml_element_vmt,Copy,Copy)
META_VMT(TYPE_FUNC,ebml_element_vmt,RenderData,RenderData)
#endif
META_END(EBML_ELEMENT_CLASS)
void EBML_MasterCheckContext(ebml_master *Element, int ProfileMask, bool_t (*ErrCallback)(void *cookie, int type, const tchar_t *ClassName, const ebml_element*), void *cookie)
{
tchar_t ClassString[MAXPATH];
ebml_element *i, *SubElt;
const ebml_semantic *s;
for (i=EBML_MasterChildren(Element);i;i=i?EBML_MasterNext(i):NULL)
{
if (!Node_IsPartOf(SubElt,EBML_DUMMY_ID))
{
for (s=Element->Base.Context->Semantic; s->eClass; ++s)
{
if (s->eClass->Id == i->Context->Id)
{
if (s->DisabledProfile & ProfileMask)
{
Node_FromStr(Element,ClassString,TSIZEOF(ClassString),s->eClass->ElementName);
if (ErrCallback && ErrCallback(cookie,MASTER_CHECK_PROFILE_INVALID,ClassString,i))
{
EBML_MasterRemove(Element,i); // make sure it doesn't remain in the list
NodeDelete((node*)i);
i=EBML_MasterChildren(Element);
break;
}
}
if (s->Unique && (SubElt=EBML_MasterFindChild(Element,s->eClass)) && EBML_MasterNextChild(Element,SubElt))
{
Node_FromStr(Element,ClassString,TSIZEOF(ClassString),s->eClass->ElementName);
if (ErrCallback && ErrCallback(cookie,MASTER_CHECK_MULTIPLE_UNIQUE,ClassString,i))
{
EBML_MasterRemove(Element,i); // make sure it doesn't remain in the list
NodeDelete((node*)i);
i=EBML_MasterChildren(Element);
break;
}
}
break;
}
}
}
}
for (s=Element->Base.Context->Semantic; s->eClass; ++s)
{
if (s->Mandatory && !s->eClass->HasDefault && !EBML_MasterFindChild(Element,s->eClass))
{
Node_FromStr(Element,ClassString,TSIZEOF(ClassString),s->eClass->ElementName);
if (ErrCallback)
ErrCallback(cookie,MASTER_CHECK_MISSING_MANDATORY,ClassString,NULL);
}
}
}
\ No newline at end of file
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
static err_t ReadDataInt(ebml_integer *Element, stream *Input, const ebml_parser_context *ParserContext, bool_t AllowDummyElt, int Scope, size_t DepthCheckCRC)
{
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
#if defined(CONFIG_EBML_UNICODE)
err_t EBML_UniStringSetValue(ebml_string *Element,const tchar_t *Value)
......
......@@ -26,6 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ebml/ebml.h"
#include "ebml/ebml_internal.h"
static bool_t IsDefaultValue(const ebml_element *Element)
{
......
......@@ -25,6 +25,7 @@ GROUP ebml2_group
ENDIF
HEADER ebml/ebml.h
HEADER ebml/ebml_internal.h
SOURCE ebmlmain.c
SOURCE ebmlelement.c {class EBMLElement_Class}
......
......@@ -25,7 +25,7 @@ GROUP matroska2_group
SOURCE matroskamain.c {class Matroska_Class}
SOURCE matroskablock.c
HEADER matroska/matroska.h
HEADER matroska_internal.h
HEADER matroska/matroska_internal.h
}
DLL matroska2
......
/*
* $Id$
* Copyright (c) 2008, Matroska Foundation
* Copyright (c) 2010, Matroska Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -26,6 +26,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBMATROSKA2_INTERNAL_H
#define LIBMATROSKA2_INTERNAL_H
/*
* ONLY INCLUDE THIS FILE IF YOU PLAN TO CREATE YOUR OWN MATROSKA-BASED CLASS
*/
#include "ebml/ebml_internal.h"
#define MATROSKA_BLOCK_READ_TRACK 0x180
#define MATROSKA_BLOCK_READ_SEGMENTINFO 0x181
#if defined(CONFIG_EBML_WRITING)
......@@ -56,3 +65,5 @@ struct matroska_block
ebml_master *WriteSegInfo;
#endif
};
#endif /* LIBMATROSKA2_INTERNAL_H */
......@@ -26,7 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "matroska/matroska.h"
#include "matroska_internal.h"
#include "matroska/matroska_internal.h"
#if defined(CONFIG_CODEC_HELPER)
#include "ivorbiscodec.h"
#include "codec_internal.h"
......
......@@ -26,7 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "matroska/matroska.h"
#include "matroska_internal.h"
#include "matroska/matroska_internal.h"
#if defined(CONFIG_ZLIB)
#include "zlib.h"
#endif
......
......@@ -161,13 +161,33 @@ static bool_t Live = 0;
static int TotalPhases = 2;
static int CurrentPhase = 1;
static bool_t MasterError(void *cookie, int type, const tchar_t *ClassName, const ebml_element *i)
{
tchar_t IdString[MAXPATH];
if (type==MASTER_CHECK_PROFILE_INVALID)
{
EBML_ElementGetName(i,IdString,TSIZEOF(IdString));
TextPrintf(StdErr,T("The %s element at %") TPRId64 T(" is not part of profile '%s', skipping\r\n"),IdString,EBML_ElementPosition(i),GetProfileName(DstProfile));
}
else if (type==MASTER_CHECK_MULTIPLE_UNIQUE)
{
EBML_ElementGetName(i,IdString,TSIZEOF(IdString));
TextPrintf(StdErr,T("The %s element at %") TPRId64 T(" has multiple versions of the unique element %s, skipping\r\n"),IdString,EBML_ElementPosition(i),ClassName);
}
else if (type==MASTER_CHECK_MISSING_MANDATORY)
{
EBML_ElementGetName(cookie,IdString,TSIZEOF(IdString));
TextPrintf(StdErr,T("The %s element at %") TPRId64 T(" is missing mandatory element %s\r\n"),IdString,EBML_ElementPosition(cookie),ClassName);
}
return 1;
}
static void ReduceSize(ebml_element *Element)
{
EBML_ElementSetSizeLength(Element, 0); // reset
if (Node_IsPartOf(Element,EBML_MASTER_CLASS))
{
ebml_element *i, *j;
const ebml_semantic *s;
if (!EBML_ElementIsType(Element,&MATROSKA_ContextClusterBlockGroup))
EBML_MasterAddMandatory((ebml_master*)Element,1);
......@@ -195,39 +215,7 @@ static void ReduceSize(ebml_element *Element)
ReduceSize(i);
}
for (i=EBML_MasterChildren(Element);i;i=i?EBML_MasterNext(i):NULL)
{
for (s=Element->Context->Semantic; s->eClass; ++s)
{
if (s->eClass->Id == i->Context->Id)
{
if (Node_IsPartOf(i,EBML_MASTER_CLASS) && !EBML_MasterCheckMandatory((ebml_master*)i,0))
{
// if it's not unique we can remove it
if (!s->Unique)
{
tchar_t IdString[MAXPATH];
Node_FromStr(i,IdString,TSIZEOF(IdString),s->eClass->ElementName);
TextPrintf(StdErr,T("The %s element at %") TPRId64 T(" is missing mandatory elements, skipping\r\n"),IdString,EBML_ElementPosition(i));
EBML_MasterRemove((ebml_master*)Element,i); // make sure it doesn't remain in the list
NodeDelete((node*)i);
i=EBML_MasterChildren((ebml_master*)Element);
break;
}
}
if ((s->DisabledProfile & DstProfile)!=0)
{
tchar_t IdString[MAXPATH];
Node_FromStr(i,IdString,TSIZEOF(IdString),s->eClass->ElementName);
TextPrintf(StdErr,T("The %s element at %") TPRId64 T(" is not part of profile '%s', skipping\r\n"),IdString,EBML_ElementPosition(i),GetProfileName(DstProfile));
EBML_MasterRemove((ebml_master*)Element,i); // make sure it doesn't remain in the list
NodeDelete((node*)i);
i=EBML_MasterChildren((ebml_master*)Element);
break;
}
}
}
}
EBML_MasterCheckContext((ebml_master*)Element, DstProfile, MasterError, Element);
}
}
......
......@@ -3,7 +3,7 @@
GROUP mkclean_base
{
PROJECT_NAME "mkclean"
PROJECT_VERSION 0.6.1
PROJECT_VERSION 0.7.0
PROJECT_VENDOR "Matroska Foundation"
USE matroska2
IF !CONFIG_EBML_UNICODE
......
......@@ -393,72 +393,47 @@ static int CheckTracks(ebml_master *Tracks, int ProfileNum)
return Result;
}
static int CheckProfileViolation(ebml_element *Elt, int ProfileMask)
struct profile_check
{
int Result = 0;
tchar_t String[MAXPATH],Invalid[MAXPATH];
ebml_element *SubElt;
Node_FromStr(Elt,String,TSIZEOF(String),Elt->Context->ElementName);
if (Node_IsPartOf(Elt,EBML_MASTER_CLASS))
{
if (!EBML_MasterIsChecksumValid((ebml_master*)Elt))
Result |= OutputError(0x203,T("Invalid checksum for element '%s' at %") TPRId64,String,Elt->ElementPosition);
for (SubElt = EBML_MasterChildren(Elt); SubElt; SubElt = EBML_MasterNext(SubElt))
{
if (!Node_IsPartOf(SubElt,EBML_DUMMY_ID))
{
const ebml_semantic *i;
for (i=Elt->Context->Semantic;i->eClass;++i)
{
if (i->eClass->Id==SubElt->Context->Id)
{
if ((i->DisabledProfile & ProfileMask)!=0)
{
Node_FromStr(Elt,Invalid,TSIZEOF(Invalid),i->eClass->ElementName);
Result |= OutputError(0x201,T("Invalid %s for profile '%s' at %") TPRId64 T(" in %s"),Invalid,GetProfileName(ProfileMask),SubElt->ElementPosition,String);
}
break;
}
}
if (Node_IsPartOf(SubElt,EBML_MASTER_CLASS))
Result |= CheckProfileViolation(SubElt, ProfileMask);
}
}
}
int *Result;
const ebml_element *Parent;
const tchar_t *EltName;
int ProfileMask;
};
return Result;
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));
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));
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));
return 0; // don't remove anything
}
static int CheckMandatory(ebml_element *Elt, int ProfileMask)
static int CheckProfileViolation(ebml_element *Elt, int ProfileMask)
{
int Result = 0;
tchar_t String[MAXPATH],Missing[MAXPATH];
tchar_t String[MAXPATH];
ebml_element *SubElt;
struct profile_check Checker;
if (Node_IsPartOf(Elt,EBML_MASTER_CLASS))
{
EBML_ElementGetName(Elt,String,TSIZEOF(String));
const ebml_semantic *i;
for (i=Elt->Context->Semantic;i->eClass;++i)
{
if ((i->DisabledProfile & ProfileMask)==0 && i->Mandatory && !i->eClass->HasDefault && !EBML_MasterFindChild(Elt,i->eClass))
{
Node_FromStr(Elt,Missing,TSIZEOF(Missing),i->eClass->ElementName);
Result |= OutputError(0x200,T("Missing element %s in %s at %") TPRId64 T(""),Missing,String,Elt->ElementPosition);
}
if ((i->DisabledProfile & ProfileMask)==0 && i->Unique && (SubElt=EBML_MasterFindChild((ebml_master*)Elt,i->eClass)) && EBML_MasterFindNextElt((ebml_master*)Elt,SubElt,0,0))
{
Node_FromStr(Elt,Missing,TSIZEOF(Missing),i->eClass->ElementName);
Result |= OutputError(0x202,T("Unique element %s in %s at %") TPRId64 T(" found more than once"),Missing,String,Elt->ElementPosition);
}
}
if (!EBML_MasterIsChecksumValid((ebml_master*)Elt))
Result |= OutputError(0x203,T("Invalid checksum for element '%s' at %") TPRId64,String,EL_Pos(Elt));
Checker.EltName = String;
Checker.ProfileMask = ProfileMask;
Checker.Parent = Elt;
Checker.Result = &Result;
EBML_MasterCheckContext((ebml_master*)Elt, ProfileMask, ProfileCallback, &Checker);
for (SubElt = EBML_MasterChildren(Elt); SubElt; SubElt = EBML_MasterNext(SubElt))
{
if (Node_IsPartOf(SubElt,EBML_MASTER_CLASS))
Result |= CheckMandatory(SubElt, ProfileMask);
}
Result |= CheckProfileViolation(SubElt,ProfileMask);
}
return Result;
......@@ -1011,7 +986,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
RLevelX = (ebml_master*)EBML_ElementSkipData((ebml_element*)RLevel1, Input, &RSegmentContext, NULL, 1);
}
else
......@@ -1043,7 +1017,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
}
else
{
......@@ -1063,7 +1036,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
if (Live)
{
......@@ -1093,7 +1065,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
EbmlHead = (ebml_master*)EBML_MasterFindFirstElt(RTrackInfo,&MATROSKA_ContextTrackEntry,0,0);
TrackCount = 0;
......@@ -1161,7 +1132,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
}
}
else
......@@ -1189,7 +1159,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
}
}
else
......@@ -1210,7 +1179,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
}
}
else
......@@ -1238,7 +1206,6 @@ int main(int argc, const char *argv[])
NodeTree_SetParent(RLevel1, RSegment, NULL);
VoidAmount += CheckUnknownElements((ebml_element*)RLevel1);
Result |= CheckProfileViolation((ebml_element*)RLevel1, MatroskaProfile);
Result |= CheckMandatory((ebml_element*)RLevel1, MatroskaProfile);
}
}
else
......
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