Skip to content

Commit

Permalink
DVDDemuxFFmpeg: Also accept pts for m_currentPts
Browse files Browse the repository at this point in the history
Some video files have valid pts but dts=DVD_NOPTS_VALUE
for I frames. Allow these to update m_currentPts
  • Loading branch information
phunkyfish committed Jan 31, 2024
1 parent 51560b9 commit de05850
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stream/FFmpegStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ DEMUX_PACKET* FFmpegStream::DemuxRead()
m_currentPts = pPacket->dts;
CurrentPTSUpdated();
}
else if (pPacket->pts != STREAM_NOPTS_VALUE && (pPacket->pts > m_currentPts || m_currentPts == STREAM_NOPTS_VALUE))
{
m_currentPts = pPacket->pts;
CurrentPTSUpdated();
}

// store internal id until we know the continuous id presented to player
// the stream might not have been created yet
Expand Down

0 comments on commit de05850

Please sign in to comment.