Skip to content
Open
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
9 changes: 7 additions & 2 deletions src/core/track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ const std::array<std::vector<AVPacketProp>, 5> FindPacketCheckSequence = {{
// If examples come up where this fallback sequence becomes relevant, it can
// be adjusted.
int FFMS_Track::FindPacket(const AVPacket &packet) const {
if (!packet.data && !packet.side_data_elems) {
// Empty packet signaling EOF
return -1;
}

FrameInfo F;
F.PTS = UseDTS ? packet.dts : packet.pts;

Expand Down Expand Up @@ -213,9 +218,9 @@ int FFMS_Track::FindPacket(const AVPacket &packet) const {
case AVPacketProp::Pos:
return it->FilePos == packet.pos;
case AVPacketProp::Hidden:
return it->MarkedHidden == (packet.flags & AV_PKT_FLAG_DISCARD);
return it->MarkedHidden == !!(packet.flags & AV_PKT_FLAG_DISCARD);
case AVPacketProp::Key:
return it->KeyFrame == (packet.flags & AV_PKT_FLAG_KEY);
return it->KeyFrame == !!(packet.flags & AV_PKT_FLAG_KEY);
}
return false;
});
Expand Down
Loading