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

Fixes for buffer and recent regressions #1323

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Conversation

CastagnaIT
Copy link
Collaborator

@CastagnaIT CastagnaIT commented Jul 11, 2023

Description

Fixes found from slack discussion

One of the problems of high memory occupation
is due to
https://github.com/xbmc/inputstream.adaptive/blob/21.1.2-Omega/src/common/AdaptiveStream.cpp#L617-L638
where we set:
assured_buffer_length_ to 60
max_buffer_length_ to 120

in the old code:
https://github.com/xbmc/inputstream.adaptive/blob/Nexus/src/common/AdaptiveStream.cpp#L541-L550
instead set:
assured_buffer_length_ to 4
max_buffer_length_ to 8

this implies we have a very big buffer that require much memory so increase a lot until the end

i think it is better to completely disable this bad code that we have been dragging around for years
now we have almost stable memory occuped, but we can see about 100 mb increased on start (seem regular its debug vs release build)
there is a little memory that increase of about 1mb each time after some seconds that could require other investigations but could be a problem at kodi side (its present also on old isa version)

this bug also reveals another problem on buffering
when we put the playback on pause, we continue download segments where should be paused and resumed when playback will be resumed, this can be improved later, until now this problem was hidden because the buffer is short

Commit: Fallback to ADTS sample reader when TS initialization fails
fix the audio with youtube HLS manifests
where we have wrong container, use file extension is not reliable,
tested with HLS version of https://www.youtube.com/watch?v=Hf5enZVznC4

Motivation and context

fix #1295

How has this been tested?

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 added Type: Fix non-breaking change which fixes an issue v21 Omega labels Jul 11, 2023
Copy link
Contributor

@glennguy glennguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pursuing this until we found an answer!

@glennguy glennguy merged commit 1e72d38 into xbmc:Omega Jul 12, 2023
9 checks passed
@CastagnaIT CastagnaIT deleted the fixes branch July 13, 2023 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Since ISA v21.1.1, some high bitrate content has abnormal memory usage that can cause Kodi to crash
2 participants