Skip to content

Commit

Permalink
don't create an EbmlId to compare them
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Jan 27, 2024
1 parent 27ac3dd commit cd4fd0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/KaxBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ filepos_t KaxInternalBlock::RenderData(IOCallback & output, bool /* bForceRender
if (mInvisible)
*cursor = 0x08;

if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {
if ((const EbmlId&)(*this) == EBML_ID(KaxSimpleBlock)) {
auto *s = reinterpret_cast<const KaxSimpleBlock*>(this);
if (s->IsKeyframe())
*cursor |= 0x80;
Expand Down Expand Up @@ -517,7 +517,7 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
bLocalTimestampUsed = true;

const std::uint8_t Flags = Mem.GetUInt8();
if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {
if ((const EbmlId&)(*this) == EBML_ID(KaxSimpleBlock)) {
auto *s = reinterpret_cast<KaxSimpleBlock*>(this);
s->SetKeyframe( (Flags & 0x80) != 0 );
s->SetDiscardable( (Flags & 0x01) != 0 );
Expand Down Expand Up @@ -643,7 +643,7 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
bLocalTimestampUsed = true;
cursor += 2;

if (EbmlId(*this) == EBML_ID(KaxSimpleBlock)) {
if ((const EbmlId&)(*this) == EBML_ID(KaxSimpleBlock)) {
auto *s = reinterpret_cast<KaxSimpleBlock*>(this);
s->SetKeyframe( (*cursor & 0x80) != 0 );
s->SetDiscardable( (*cursor & 0x01) != 0 );
Expand Down

0 comments on commit cd4fd0e

Please sign in to comment.