// a frame in a lace is not efficient when the place necessary to code it in a lace is bigger
// than the size of a simple Block. That means more than 6 bytes (4 in struct + 2 for EBML) to code the size
return (buffer.Size() < 6*0xFF);
- else
- return true;
+
+ return true;
}
/*!
EbmlLacingSize += CodedSizeLengthSigned(int64(myBuffers[i]->Size()) - int64(myBuffers[i - 1]->Size()), 0);
if (SameSize)
return LACING_FIXED;
- else if (XiphLacingSize < EbmlLacingSize)
+ if (XiphLacingSize < EbmlLacingSize)
return LACING_XIPH;
- else
- return LACING_EBML;
+
+ return LACING_EBML;
}
filepos_t KaxInternalBlock::UpdateSize(bool /* bSaveDefault */, bool /* bForceRender */)
assert(Block.group);
if (bUseSimpleBlock)
return *Block.simpleblock;
- else
- return *Block.group;
+ return *Block.group;
}
KaxBlockBlob::operator const KaxInternalBlock &() const
assert(Block.group);
if (bUseSimpleBlock)
return *Block.simpleblock;
- else
- return *Block.group;
+ return *Block.group;
}
KaxBlockBlob::operator KaxSimpleBlock &()
if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, *ForwBlock, lacing)) {
// more data are allowed in this Block
return true;
- } else {
- currentNewBlock = NULL;
- return false;
}
- } else {
- if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {
- // more data are allowed in this Block
- return true;
- } else {
- currentNewBlock = NULL;
- return false;
- }
- }
- } else {
- if (currentNewBlock->AddFrame(track, timecode, buffer, lacing)) {
- // more data are allowed in this Block
- return true;
- } else {
+
currentNewBlock = NULL;
return false;
}
+ if (currentNewBlock->AddFrame(track, timecode, buffer, *PastBlock, lacing)) {
+ // more data are allowed in this Block
+ return true;
+ }
+ currentNewBlock = NULL;
+ return false;
}
+
+ if (currentNewBlock->AddFrame(track, timecode, buffer, lacing)) {
+ // more data are allowed in this Block
+ return true;
+ }
+
+ currentNewBlock = NULL;
+ return false;
}
bool KaxCluster::AddFrame(const KaxTrackEntry & track, uint64 timecode, DataBuffer & buffer, KaxBlockGroup * & MyNewBlock, LacingType lacing)