libwebm: Block::GetTimeCode allows NULL param

Change-Id: Ia62820637f1819d1904d2e6e7b20bd3c39053bb5
This commit is contained in:
matthewjheaney 2011-04-03 10:51:22 -05:00
parent 35ded77a23
commit 06f08663be

View File

@ -8443,12 +8443,13 @@ Block::~Block()
long long Block::GetTimeCode(const Cluster* pCluster) const
{
assert(pCluster);
if (pCluster == 0)
return m_timecode;
const long long tc0 = pCluster->GetTimeCode();
assert(tc0 >= 0);
const long long tc = tc0 + static_cast<long long>(m_timecode);
const long long tc = tc0 + m_timecode;
assert(tc >= 0);
return tc; //unscaled timecode units