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

Fix seek ffmpeg6 #264

Closed
wants to merge 5 commits into from
Closed

Conversation

phunkyfish
Copy link
Collaborator

Based off changes in Kodi PR: https://github.com/xbmc/xbmc/pull/23557/commits and https://github.com/xbmc/xbmc/pull/23629/commits

The first commit is ok. The second required removing UpdateCurrentPTS() which is used for catchup support. Need a better solution for doing the offset for catchup streams.

Commits 3,4 and 5 are followups and also OK.

TL;DR; fix commit 2

…these points, so m_pkt.pkt.dts is invalid. m_currentPts will be updated when a valid packet is read.
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
@phunkyfish phunkyfish force-pushed the fix-seek-ffmpeg6 branch 3 times, most recently from 6e72c9a to fef0f52 Compare January 28, 2024 18:49
…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.
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.

1 participant