Skip to content

Commit ed80530

Browse files
committed
Don't try to find EOF packets in FindPacket
Apart from being a tiny optimization this makes it easier to check for which sample files there are packets are not being found.
1 parent 4c17355 commit ed80530

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/core/track.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ const std::array<std::vector<AVPacketProp>, 5> FindPacketCheckSequence = {{
185185
// If examples come up where this fallback sequence becomes relevant, it can
186186
// be adjusted.
187187
int FFMS_Track::FindPacket(const AVPacket &packet) const {
188+
if (!packet.data && !packet.side_data_elems) {
189+
// Empty packet signaling EOF
190+
return -1;
191+
}
192+
188193
FrameInfo F;
189194
F.PTS = UseDTS ? packet.dts : packet.pts;
190195

0 commit comments

Comments
 (0)