Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmatroska2: 0 duration frames can be keyframes #189

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions libmatroska2/matroskamain.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,6 @@ uint16_t MATROSKA_BlockTrackNum(const matroska_block *Block)
bool_t MATROSKA_BlockKeyframe(const matroska_block *Block)
{
ebml_master *BlockGroup;
ebml_integer *Duration;

assert(Node_IsPartOf(Block,MATROSKA_BLOCK_CLASS));
if (Block->IsKeyframe)
Expand All @@ -711,14 +710,7 @@ bool_t MATROSKA_BlockKeyframe(const matroska_block *Block)
if (!BlockGroup || !Node_IsPartOf(BlockGroup,MATROSKA_BLOCKGROUP_CLASS))
return 0;

if (EBML_MasterFindChild(BlockGroup,MATROSKA_getContextReferenceBlock()))
return 0;

Duration = (ebml_integer*)EBML_MasterFindChild(BlockGroup,MATROSKA_getContextBlockDuration());
if (Duration!=NULL && EBML_IntegerValue(Duration)==0)
return 0;

return 1;
return EBML_MasterFindChild(BlockGroup,MATROSKA_getContextReferenceBlock()) == NULL;
}

bool_t MATROSKA_BlockDiscardable(const matroska_block *Block)
Expand Down
Loading