DataBuffer * DataBuffer::Clone()
{
binary *ClonedData = (binary *)malloc(mySize * sizeof(binary));
- assert(ClonedData != NULL);
+ assert(ClonedData != nullptr);
memcpy(ClonedData, myBuffer ,mySize );
SimpleDataBuffer * result = new SimpleDataBuffer(ClonedData, mySize, 0);
SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone)
:DataBuffer((binary *)malloc(ToClone.mySize * sizeof(binary)), ToClone.mySize, myFreeBuffer)
{
- assert(myBuffer != NULL);
+ assert(myBuffer != nullptr);
memcpy(myBuffer, ToClone.myBuffer ,mySize );
bValidValue = ToClone.bValidValue;
}
KaxBlockGroup::KaxBlockGroup(EBML_EXTRA_DEF)
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxBlockGroup) EBML_DEF_SEP EBML_EXTRA_CALL)
- ,ParentCluster(NULL)
- ,ParentTrack(NULL)
+ ,ParentCluster(nullptr)
+ ,ParentTrack(nullptr)
{}
/*!
filepos_t KaxInternalBlock::UpdateSize(bool /* bSaveDefault */, bool /* bForceRender */)
{
LacingType LacingHere;
- assert(EbmlBinary::GetBuffer() == NULL); // Data is not used for KaxInternalBlock
+ assert(EbmlBinary::GetBuffer() == nullptr); // Data is not used for KaxInternalBlock
assert(TrackNumber < 0x4000); // no more allowed for the moment
unsigned int i;
}
KaxBlockVirtual::KaxBlockVirtual(EBML_EXTRA_DEF)
- :EBML_DEF_BINARY(KaxBlockVirtual)EBML_DEF_SEP ParentCluster(NULL)
+ :EBML_DEF_BINARY(KaxBlockVirtual)EBML_DEF_SEP ParentCluster(nullptr)
{
SetBuffer(DataBlock,sizeof(DataBlock));
SetValueIsSet(false);
KaxBlockVirtual::~KaxBlockVirtual()
{
if(GetBuffer() == DataBlock)
- SetBuffer( NULL, 0 );
+ SetBuffer( nullptr, 0 );
}
filepos_t KaxBlockVirtual::UpdateSize(bool /* bSaveDefault */, bool /* bForceRender */)
*cursor++ = TrackNumber & 0xFF;
}
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);
big_int16 b16(ActualTimecode);
b16.Fill(cursor);
*cursor++ = TrackNumber & 0xFF;
}
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
int16 ActualTimecode = ParentCluster->GetBlockLocalTimecode(Timecode);
big_int16 b16(ActualTimecode);
b16.Fill(cursor);
big_int16 b16;
b16.Eval(cursor);
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
Timecode = ParentCluster->GetBlockGlobalTimecode(int16(b16));
bLocalTimecodeUsed = false;
cursor += 2;
bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing)
{
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
theBlock.SetParent(*ParentCluster);
ParentTrack = &track;
return theBlock.AddFrame(track, timecode, buffer, lacing);
// assert(past_timecode < 0);
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
theBlock.SetParent(*ParentCluster);
ParentTrack = &track;
bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
// assert(forw_timecode > 0);
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
theBlock.SetParent(*ParentCluster);
ParentTrack = &track;
bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
bool KaxBlockGroup::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock, LacingType lacing)
{
KaxBlock & theBlock = GetChild<KaxBlock>(*this);
- assert(ParentCluster != NULL);
+ assert(ParentCluster != nullptr);
theBlock.SetParent(*ParentCluster);
ParentTrack = &track;
bool bRes = theBlock.AddFrame(track, timecode, buffer, lacing);
- if (PastBlock != NULL) {
+ if (PastBlock != nullptr) {
KaxReferenceBlock & thePastRef = GetChild<KaxReferenceBlock>(*this);
thePastRef.SetReferencedBlock(PastBlock);
thePastRef.SetParentBlock(*this);
}
- if (ForwBlock != NULL) {
+ if (ForwBlock != nullptr) {
KaxReferenceBlock & theFutureRef = AddNewChild<KaxReferenceBlock>(*this);
theFutureRef.SetReferencedBlock(ForwBlock);
theFutureRef.SetParentBlock(*this);
*/
uint64 KaxBlockGroup::GlobalTimecode() const
{
- assert(ParentCluster != NULL); // impossible otherwise
+ assert(ParentCluster != nullptr); // impossible otherwise
KaxInternalBlock & MyBlock = *static_cast<KaxBlock *>(this->FindElt(EBML_INFO(KaxBlock)));
return MyBlock.GlobalTimecode();
uint64 KaxBlockGroup::ClusterPosition() const
{
- assert(ParentCluster != NULL); // impossible otherwise
+ assert(ParentCluster != nullptr); // impossible otherwise
return ParentCluster->GetPosition();
}
uint64 KaxInternalBlock::ClusterPosition() const
{
- assert(ParentCluster != NULL); // impossible otherwise
+ assert(ParentCluster != nullptr); // impossible otherwise
return ParentCluster->GetPosition();
}
{
unsigned int Result = 0;
KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(EBML_INFO(KaxReferenceBlock)));
- if (MyBlockAdds != NULL) {
+ if (MyBlockAdds != nullptr) {
Result++;
- while ((MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds))) != NULL) {
+ while ((MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds))) != nullptr) {
Result++;
}
}
const KaxReferenceBlock & KaxBlockGroup::Reference(unsigned int Index) const
{
KaxReferenceBlock * MyBlockAdds = static_cast<KaxReferenceBlock *>(FindFirstElt(EBML_INFO(KaxReferenceBlock)));
- assert(MyBlockAdds != NULL); // call of a non existing reference
+ assert(MyBlockAdds != nullptr); // call of a non existing reference
while (Index != 0) {
MyBlockAdds = static_cast<KaxReferenceBlock *>(FindNextElt(*MyBlockAdds));
- assert(MyBlockAdds != NULL);
+ assert(MyBlockAdds != nullptr);
Index--;
}
return *MyBlockAdds;
// free the allocated Frames
int i;
for (i=myBuffers.size()-1; i>=0; i--) {
- if (myBuffers[i] != NULL) {
+ if (myBuffers[i] != nullptr) {
myBuffers[i]->FreeBuffer(*myBuffers[i]);
delete myBuffers[i];
- myBuffers[i] = NULL;
+ myBuffers[i] = nullptr;
}
}
}
void KaxBlockGroup::SetBlockDuration(uint64 TimeLength)
{
- assert(ParentTrack != NULL);
+ assert(ParentTrack != nullptr);
int64 scale = ParentTrack->GlobalTimecodeScale();
KaxBlockDuration & myDuration = *static_cast<KaxBlockDuration *>(FindFirstElt(EBML_INFO(KaxBlockDuration), true));
*(static_cast<EbmlUInteger *>(&myDuration)) = TimeLength / uint64(scale);
bool KaxBlockGroup::GetBlockDuration(uint64 &TheTimecode) const
{
KaxBlockDuration * myDuration = static_cast<KaxBlockDuration *>(FindElt(EBML_INFO(KaxBlockDuration)));
- if (myDuration == NULL) {
+ if (myDuration == nullptr) {
return false;
}
- assert(ParentTrack != NULL);
+ assert(ParentTrack != nullptr);
TheTimecode = uint64(*myDuration) * ParentTrack->GlobalTimecodeScale();
return true;
}
bool KaxBlockBlob::AddFrameAuto(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, LacingType lacing, const KaxBlockBlob * PastBlock, const KaxBlockBlob * ForwBlock)
{
bool bResult = false;
- if ((SimpleBlockMode == BLOCK_BLOB_ALWAYS_SIMPLE) || (SimpleBlockMode == BLOCK_BLOB_SIMPLE_AUTO && PastBlock == NULL && ForwBlock == NULL)) {
+ if ((SimpleBlockMode == BLOCK_BLOB_ALWAYS_SIMPLE) || (SimpleBlockMode == BLOCK_BLOB_SIMPLE_AUTO && PastBlock == nullptr && ForwBlock == nullptr)) {
assert(bUseSimpleBlock == true);
- if (Block.simpleblock == NULL) {
+ if (Block.simpleblock == nullptr) {
Block.simpleblock = new KaxSimpleBlock();
Block.simpleblock->SetParent(*ParentCluster);
}
bResult = Block.simpleblock->AddFrame(track, timecode, buffer, lacing);
- if (PastBlock == NULL && ForwBlock == NULL) {
+ if (PastBlock == nullptr && ForwBlock == nullptr) {
Block.simpleblock->SetKeyframe(true);
Block.simpleblock->SetDiscardable(false);
} else {
Block.simpleblock->SetKeyframe(false);
- if ((ForwBlock == NULL || ((const KaxInternalBlock &)*ForwBlock).GlobalTimecode() <= timecode) &&
- (PastBlock == NULL || ((const KaxInternalBlock &)*PastBlock).GlobalTimecode() <= timecode))
+ if ((ForwBlock == nullptr || ((const KaxInternalBlock &)*ForwBlock).GlobalTimecode() <= timecode) &&
+ (PastBlock == nullptr || ((const KaxInternalBlock &)*PastBlock).GlobalTimecode() <= timecode))
Block.simpleblock->SetDiscardable(false);
else
Block.simpleblock->SetDiscardable(true);
return false;
if (!bUseSimpleBlock) {
- if (Block.group == NULL) {
+ if (Block.group == nullptr) {
Block.group = new KaxBlockGroup();
}
}
else {
- if (Block.simpleblock != NULL) {
+ if (Block.simpleblock != nullptr) {
KaxSimpleBlock *old_simpleblock = Block.simpleblock;
Block.group = new KaxBlockGroup();
// _TODO_ : move all the data to the blockgroup
Block.group = new KaxBlockGroup();
}
}
- if (ParentCluster != NULL)
+ if (ParentCluster != nullptr)
Block.group->SetParent(*ParentCluster);
bUseSimpleBlock = false;
const KaxBlockBlob & KaxReferenceBlock::RefBlock() const
{
- assert(RefdBlock != NULL);
+ assert(RefdBlock != nullptr);
return *RefdBlock;
}
KaxReferenceBlock::KaxReferenceBlock(EBML_EXTRA_DEF)
:EBML_DEF_SINTEGER(KaxReferenceBlock)EBML_DEF_SEP
- RefdBlock(NULL)
- ,ParentBlock(NULL)
+ RefdBlock(nullptr)
+ ,ParentBlock(nullptr)
,bTimecodeSet(false)
,bOurBlob(false)
{
KaxReferenceBlock::KaxReferenceBlock(const KaxReferenceBlock & ElementToClone)
:EbmlSInteger(ElementToClone)
- ,RefdBlock(NULL)
- ,ParentBlock(NULL)
+ ,RefdBlock(nullptr)
+ ,ParentBlock(nullptr)
,bTimecodeSet(ElementToClone.bTimecodeSet)
,bOurBlob(false)
{
void KaxReferenceBlock::FreeBlob()
{
- if (bOurBlob && RefdBlock!=NULL)
+ if (bOurBlob && RefdBlock!=nullptr)
delete RefdBlock;
- RefdBlock = NULL;
+ RefdBlock = nullptr;
}
filepos_t KaxReferenceBlock::UpdateSize(bool bSaveDefault, bool bForceRender)
{
if (!bTimecodeSet) {
- assert(RefdBlock != NULL);
- assert(ParentBlock != NULL);
+ assert(RefdBlock != nullptr);
+ assert(ParentBlock != nullptr);
const KaxInternalBlock &block = *RefdBlock;
*static_cast<EbmlSInteger*>(this) = (int64(block.GlobalTimecode()) - int64(ParentBlock->GlobalTimecode())) / int64(ParentBlock->GlobalTimecodeScale());
void KaxReferenceBlock::SetReferencedBlock(const KaxBlockBlob * aRefdBlock)
{
- assert(RefdBlock == NULL);
- assert(aRefdBlock != NULL);
+ assert(RefdBlock == nullptr);
+ assert(aRefdBlock != nullptr);
FreeBlob();
RefdBlock = aRefdBlock;
bOurBlob = true;
KaxCluster::KaxCluster(EBML_EXTRA_DEF)
:EbmlMaster(EBML_CLASS_SEMCONTEXT(KaxCluster) EBML_DEF_SEP EBML_EXTRA_CALL)
- ,currentNewBlock(NULL)
- ,ParentSegment(NULL)
+ ,currentNewBlock(nullptr)
+ ,ParentSegment(nullptr)
,bFirstFrameInside(false)
,bPreviousTimecodeIsSet(false)
,bTimecodeScaleIsSet(false)
MaxTimecode = timecode;
}
- MyNewBlock = NULL;
+ MyNewBlock = nullptr;
if (lacing == LACING_NONE || !track.LacingEnabled()) {
- currentNewBlock = NULL;
+ currentNewBlock = nullptr;
}
// force creation of a new block
- if (currentNewBlock == NULL || uint32(track.TrackNumber()) != uint32(currentNewBlock->TrackNumber()) || PastBlock != NULL || ForwBlock != NULL) {
+ if (currentNewBlock == nullptr || uint32(track.TrackNumber()) != uint32(currentNewBlock->TrackNumber()) || PastBlock != nullptr || ForwBlock != nullptr) {
KaxBlockGroup & aNewBlock = GetNewBlock();
MyNewBlock = currentNewBlock = &aNewBlock;
}
- if (PastBlock != NULL) {
- if (ForwBlock != NULL) {
+ if (PastBlock != nullptr) {
+ if (ForwBlock != nullptr) {
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, *ForwBlock, lacing)) {
// more data are allowed in this Block
return true;
}
- currentNewBlock = NULL;
+ currentNewBlock = nullptr;
return false;
}
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {
// more data are allowed in this Block
return true;
}
- currentNewBlock = NULL;
+ currentNewBlock = nullptr;
return false;
}
return true;
}
- currentNewBlock = NULL;
+ currentNewBlock = nullptr;
return false;
}
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing)
{
assert(Blobs.empty()); // mutually exclusive for the moment
- return AddFrameInternal(track, timecode, buffer, MyNewBlock, NULL, NULL, lacing);
+ return AddFrameInternal(track, timecode, buffer, MyNewBlock, nullptr, nullptr, lacing);
}
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, LacingType lacing)
{
assert(Blobs.empty()); // mutually exclusive for the moment
- return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, NULL, lacing);
+ return AddFrameInternal(track, timecode, buffer, MyNewBlock, &PastBlock, nullptr, lacing);
}
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, const KaxBlockGroup & PastBlock, const KaxBlockGroup & ForwBlock, LacingType lacing)
// the track wasn't found in this cluster
if (Itr == end()) {
KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
- assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
+ assert(SilentTracks != nullptr); // the flag bSilentTracksUsed should be set when creating the Cluster
KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
*static_cast<EbmlUInteger *>(trackelt) = tracknum;
}
// the track wasn't found in this cluster
if (Index == ListSize()) {
KaxClusterSilentTracks * SilentTracks = static_cast<KaxClusterSilentTracks *>(this->FindFirstElt(EBML_INFO(KaxClusterSilentTracks)));
- assert(SilentTracks != NULL); // the flag bSilentTracksUsed should be set when creating the Cluster
+ assert(SilentTracks != nullptr); // the flag bSilentTracksUsed should be set when creating the Cluster
KaxClusterSilentTrackNumber * trackelt = static_cast<KaxClusterSilentTrackNumber *>(SilentTracks->AddNewElt(EBML_INFO(KaxClusterSilentTrackNumber)));
*static_cast<EbmlUInteger *>(trackelt) = tracknum;
}
uint64 KaxCluster::GetPosition() const
{
- assert(ParentSegment != NULL);
+ assert(ParentSegment != nullptr);
return ParentSegment->GetRelativePosition(*this);
}
const KaxCuePoint * KaxCues::GetTimecodePoint(uint64 aTimecode) const
{
uint64 TimecodeToLocate = aTimecode / GlobalTimecodeScale();
- const KaxCuePoint * aPointPrev = NULL;
+ const KaxCuePoint * aPointPrev = nullptr;
uint64 aPrevTime = 0;
uint64 aNextTime = EBML_PRETTYLONGINT(0xFFFFFFFFFFFF);
const KaxCuePoint *tmp = static_cast<const KaxCuePoint *>(*Itr);
// check the tile
const KaxCueTime *aTime = static_cast<const KaxCueTime *>(tmp->FindFirstElt(EBML_INFO(KaxCueTime)));
- if (aTime != NULL) {
+ if (aTime != nullptr) {
uint64 _Time = uint64(*aTime);
if (_Time > aPrevTime && _Time < TimecodeToLocate) {
aPrevTime = _Time;
uint64 KaxCues::GetTimecodePosition(uint64 aTimecode) const
{
const KaxCuePoint * aPoint = GetTimecodePoint(aTimecode);
- if (aPoint == NULL)
+ if (aPoint == nullptr)
return 0;
const KaxCueTrackPositions * aTrack = aPoint->GetSeekPosition();
- if (aTrack == NULL)
+ if (aTrack == nullptr)
return 0;
return aTrack->ClusterPosition();
}
KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockReference.FindFirstElt(EBML_INFO(KaxCodecState)));
- if (CodecState != NULL) {
+ if (CodecState != nullptr) {
KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
}
if (!BlobReference.IsSimpleBlock()) {
const KaxBlockGroup &BlockGroup = BlobReference;
const KaxCodecState *CodecState = static_cast<KaxCodecState *>(BlockGroup.FindFirstElt(EBML_INFO(KaxCodecState)));
- if (CodecState != NULL) {
+ if (CodecState != nullptr) {
KaxCueCodecState &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
}
// compare timecode
const KaxCueTime * TimeCodeA = static_cast<const KaxCueTime *>(FindElt(EBML_INFO(KaxCueTime)));
- if (TimeCodeA == NULL)
+ if (TimeCodeA == nullptr)
return false;
const KaxCueTime * TimeCodeB = static_cast<const KaxCueTime *>(theCmp.FindElt(EBML_INFO(KaxCueTime)));
- if (TimeCodeB == NULL)
+ if (TimeCodeB == nullptr)
return false;
if (TimeCodeA->IsSmallerThan(TimeCodeB))
// compare tracks (timecodes are equal)
const KaxCueTrack * TrackA = static_cast<const KaxCueTrack *>(FindElt(EBML_INFO(KaxCueTrack)));
- if (TrackA == NULL)
+ if (TrackA == nullptr)
return false;
const KaxCueTrack * TrackB = static_cast<const KaxCueTrack *>(theCmp.FindElt(EBML_INFO(KaxCueTrack)));
- if (TrackB == NULL)
+ if (TrackB == nullptr)
return false;
if (TrackA->IsSmallerThan(TrackB))
bool KaxCuePoint::Timecode(uint64 & aTimecode, uint64 GlobalTimecodeScale) const
{
const KaxCueTime *aTime = static_cast<const KaxCueTime *>(FindFirstElt(EBML_INFO(KaxCueTime)));
- if (aTime == NULL)
+ if (aTime == nullptr)
return false;
aTimecode = uint64(*aTime) * GlobalTimecodeScale;
return true;
*/
const KaxCueTrackPositions * KaxCuePoint::GetSeekPosition() const
{
- const KaxCueTrackPositions * result = NULL;
+ const KaxCueTrackPositions * result = nullptr;
uint64 aPosition = EBML_PRETTYLONGINT(0xFFFFFFFFFFFFFFF);
// find the position of the "earlier" Cluster
const KaxCueTrackPositions *aPoss = static_cast<const KaxCueTrackPositions *>(FindFirstElt(EBML_INFO(KaxCueTrackPositions)));
- while (aPoss != NULL) {
+ while (aPoss != nullptr) {
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(aPoss->FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
- if (aPos != NULL && uint64(*aPos) < aPosition) {
+ if (aPos != nullptr && uint64(*aPos) < aPosition) {
aPosition = uint64(*aPos);
result = aPoss;
}
uint64 KaxCueTrackPositions::ClusterPosition() const
{
const KaxCueClusterPosition *aPos = static_cast<const KaxCueClusterPosition *>(FindFirstElt(EBML_INFO(KaxCueClusterPosition)));
- if (aPos == NULL)
+ if (aPos == nullptr)
return 0;
return uint64(*aPos);
uint16 KaxCueTrackPositions::TrackNumber() const
{
const KaxCueTrack *aTrack = static_cast<const KaxCueTrack *>(FindFirstElt(EBML_INFO(KaxCueTrack)));
- if (aTrack == NULL)
+ if (aTrack == nullptr)
return 0;
return uint16(*aTrack);
{
// parse all the Entries and find the first to match the type
KaxSeek * aElt = static_cast<KaxSeek *>(FindFirstElt(EBML_INFO(KaxSeek)));
- while (aElt != NULL) {
- KaxSeekID * aId = NULL;
+ while (aElt != nullptr) {
+ KaxSeekID * aId = nullptr;
EBML_MASTER_ITERATOR Itr;
for (Itr = aElt->begin(); Itr != aElt->end(); ++Itr) {
if (EbmlId(*(*Itr)) == EBML_ID(KaxSeekID)) {
aElt = static_cast<KaxSeek *>(FindNextElt(*aElt));
}
- return NULL;
+ return nullptr;
}
KaxSeek * KaxSeekHead::FindNextOf(const KaxSeek &aPrev) const
}
}
- return NULL;
+ return nullptr;
}
int64 KaxSeek::Location() const
{
KaxSeekPosition *aPos = static_cast<KaxSeekPosition*>(FindFirstElt(EBML_INFO(KaxSeekPosition)));
- if (aPos == NULL)
+ if (aPos == nullptr)
return 0;
return uint64(*aPos);
}
bool KaxSeek::IsEbmlId(const EbmlId & aId) const
{
KaxSeekID *_Id = static_cast<KaxSeekID*>(FindFirstElt(EBML_INFO(KaxSeekID)));
- if (_Id == NULL)
+ if (_Id == nullptr)
return false;
EbmlId aEbmlId(_Id->GetBuffer(), _Id->GetSize());
return (aId == aEbmlId);
bool KaxSeek::IsEbmlId(const KaxSeek & aPoint) const
{
KaxSeekID *_IdA = static_cast<KaxSeekID*>(FindFirstElt(EBML_INFO(KaxSeekID)));
- if (_IdA == NULL)
+ if (_IdA == nullptr)
return false;
KaxSeekID *_IdB = static_cast<KaxSeekID*>(aPoint.FindFirstElt(EBML_INFO(KaxSeekID)));
- if (_IdB == NULL)
+ if (_IdB == nullptr)
return false;
EbmlId aEbmlIdA(_IdA->GetBuffer(), _IdA->GetSize());
EbmlId aEbmlIdB(_IdB->GetBuffer(), _IdB->GetSize());