Skip to content

Commit

Permalink
Guess packet type from video packets only
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Oct 17, 2023
1 parent 21398f9 commit 241aa15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion YUViewLib/src/filesource/FileSourceFFmpegFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ bool FileSourceFFmpegFile::goToNextPacket(bool videoPacketsOnly)
(int)this->currentPacket.getDTS(),
this->currentPacket.getFlagKeyframe() ? " - keyframe" : "");

if (this->packetDataFormat == PacketDataFormat::Unknown)
if (this->currentPacket.getPacketType() == PacketType::VIDEO &&
this->packetDataFormat == PacketDataFormat::Unknown)
// This is the first video package that we find and we don't know what the format of the packet
// data is. Guess the format from the data in the first package This format should not change
// from packet to packet
Expand Down

0 comments on commit 241aa15

Please sign in to comment.