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

[HLS] Fix misaligned periods update for VOD and crash #1713

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

CastagnaIT
Copy link
Collaborator

@CastagnaIT CastagnaIT commented Oct 29, 2024

Description

commit 1: Fix misaligned periods update

to reproduce easily the problem use HLS VOD with multiperiods
and set "Stream selection type" to "Manual OSD"
while in playback use kodi GUI to change video stream quality
you can see that when quality change the chapters increase and sometimes other oddities and errors in the log appear
even sometimes the playback becomes unstable,
imo it could be not the best fix, i do not currently have the patience to invest days to do something better, since i have pending other tasks

the problem is that ProcessChildManifest is called e.g. from OnStreamChange with current period/rep
this is ok for live stream but with VOD there are static periods, if you provide the current period e.g. 2
it start to parse manifest and update data from period 2 onwards but manifest periods start from 1, this cause big mess and misaligned periods data

commit 2:

to reproduce the problem is needed an HLS VOD with multiperiods and DRM
and is required to have more streams with differents PSSH (so the use case of D+)
then set "Stream selection type" to "Test" in order to switch stream quality automatically to trigger the DEMUX_SPECIALID_STREAMCHANGE
I added the explanation of the problem in the code, because it is a particular case that might not be so straightforward to understand

Motivation and context

fix #1707

How has this been tested?

tested with D+ and user confirmed

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • I have read the Contributing document
  • My code follows the Code Guidelines of this project
  • My change requires a change to the Wiki documentation
  • I have updated the documentation accordingly

@CastagnaIT CastagnaIT changed the title [HLS] Fix misaligned periods update for VOD [HLS] Fix misaligned periods update for VOD and crash Oct 31, 2024
@CastagnaIT CastagnaIT added Type: Fix non-breaking change which fixes an issue v22 Piers Component: HLS labels Oct 31, 2024
@CastagnaIT CastagnaIT marked this pull request as ready for review October 31, 2024 17:29
@CastagnaIT CastagnaIT merged commit 935a80a into xbmc:Piers Oct 31, 2024
10 checks passed
@CastagnaIT CastagnaIT deleted the hls_fix branch October 31, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport: Done Component: HLS Type: Fix non-breaking change which fixes an issue v22 Piers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Kodi crashes when playing streams from D+
1 participant