initialized members using initialize list of EBMLHeader
Change-Id: I5bb46132141d7381dd23e0a3b87a3b6c0e8b7f4b
This commit is contained in:
parent
3b0f1b6d2b
commit
b81751642e
@ -592,9 +592,10 @@ bool mkvparser::Match(
|
||||
namespace mkvparser
|
||||
{
|
||||
|
||||
EBMLHeader::EBMLHeader():
|
||||
EBMLHeader::EBMLHeader() :
|
||||
m_docType(NULL)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
EBMLHeader::~EBMLHeader()
|
||||
@ -602,6 +603,23 @@ EBMLHeader::~EBMLHeader()
|
||||
delete[] m_docType;
|
||||
}
|
||||
|
||||
void EBMLHeader::Init()
|
||||
{
|
||||
m_version = 1;
|
||||
m_readVersion = 1;
|
||||
m_maxIdLength = 4;
|
||||
m_maxSizeLength = 8;
|
||||
|
||||
if (m_docType)
|
||||
{
|
||||
delete[] m_docType;
|
||||
m_docType = NULL;
|
||||
}
|
||||
|
||||
m_docTypeVersion = 1;
|
||||
m_docTypeReadVersion = 1;
|
||||
}
|
||||
|
||||
long long EBMLHeader::Parse(
|
||||
IMkvReader* pReader,
|
||||
long long& pos)
|
||||
@ -700,13 +718,8 @@ long long EBMLHeader::Parse(
|
||||
return pos + result;
|
||||
|
||||
end = pos + result;
|
||||
|
||||
m_version = 1;
|
||||
m_readVersion = 1;
|
||||
m_maxIdLength = 4;
|
||||
m_maxSizeLength = 8;
|
||||
m_docTypeVersion = 1;
|
||||
m_docTypeReadVersion = 1;
|
||||
|
||||
Init();
|
||||
|
||||
while (pos < end)
|
||||
{
|
||||
|
@ -56,6 +56,7 @@ struct EBMLHeader
|
||||
long long m_docTypeReadVersion;
|
||||
|
||||
long long Parse(IMkvReader*, long long&);
|
||||
void Init();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user