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

Sync ffmpeg6 seek with kodi part2 - include the st->cur_pts replacement in FFmpeg6 #269

Merged
merged 7 commits into from
Jan 31, 2024

Conversation

phunkyfish
Copy link
Collaborator

v21.3.1

  • Update seeking in FFmpegDirect to mimic the st->cur_pts replacement in FFmpeg6
  • Sync FFmpegStream.cpp and DemuxStream.cpp with xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp from https://github.com/xbmc/xbmc. Update for all commits up to the end of 2023 - part 2

hasAudio/hasVideo should be set based on streams seen.
We don't want to wait for a packet to be seen
otherwise we go through the hasAudio path even if video packets are coming later
The m_seekStream check was added to avoid IsTransportStreamReady returning false after a stream
has started but most recent packet has no valid dts.

But this prevents detection of stream changes (e.g. video stream appearing later than audio).

Instead we can use the fact m_startTime is set to avoid issue with missing dts in most recent packet
…rt chapters

m_currentPts is not currently set after a seek until a suitable packet is read.

That may cause issues with chapters, so make sure m_currentPts is valid
immediately after a seek.
…these points, so m_pkt.pkt.dts is invalid. m_currentPts will be updated when a valid packet is read. A new override CurrentPTSUpdated() will be called when this happens so catchup streams can update their internal references
Some video files have valid pts but dts=DVD_NOPTS_VALUE
for I frames. Allow these to update m_currentPts
@phunkyfish phunkyfish merged commit 990ec69 into xbmc:Omega Jan 31, 2024
2 of 9 checks passed
@phunkyfish phunkyfish deleted the sync-ffmpeg6-seek-with-kodi branch January 31, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant