-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Bugfix: Store track info when buffer codec switched #4308
Merged
robwalch
merged 6 commits into
video-dev:master
from
albertdaurell:bugfix/ensure-changetype-called-when-required
Jan 18, 2022
Merged
Bugfix: Store track info when buffer codec switched #4308
robwalch
merged 6 commits into
video-dev:master
from
albertdaurell:bugfix/ensure-changetype-called-when-required
Jan 18, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
albertdaurell
force-pushed
the
bugfix/ensure-changetype-called-when-required
branch
2 times, most recently
from
September 3, 2021 13:02
424f4f6
to
a66184e
Compare
albertdaurell
force-pushed
the
bugfix/ensure-changetype-called-when-required
branch
from
September 3, 2021 13:03
a66184e
to
da99b8d
Compare
albertdaurell
changed the title
Store track info when buffer codec switched
Bugfix: Store track info when buffer codec switched
Sep 9, 2021
robwalch
approved these changes
Jan 18, 2022
littlespex
pushed a commit
to cbsinteractive/hls.js
that referenced
this pull request
Dec 9, 2022
Fix is based on suggestions from @joeyparrish in shaka-project/shaka-player#4308 (comment). During automatic adaptations, Shaka will now reset the timestamp offset to ensure the newly active track is properly aligned in the presentation. Verified by disabling ABR and manually triggering variant switches (`shaka.Player.selectVariantTrack()`) between seemingly problematic combinations (e.g., `400k` bps => `6000k` bps stream). Behavior was compared against production. Since `adaptation` events are only triggered by ABR logic (and ABR was disabled for manual testing), `selectVariantTrack()` logic was temporarily changed from: `this.switchVariant_(variant, /* fromAdaptation= */ false, clearBuffer, safeMargin);` => `this.switchVariant_(variant, /* fromAdaptation= */ true, clearBuffer, safeMargin);` to ensure the fixes proposed in this PR were taken into effect and being used during manual testing. Tested content is from the reported bug, located here: shaka-project/shaka-player#4308 (comment) Closes video-dev#4308
littlespex
pushed a commit
to cbsinteractive/hls.js
that referenced
this pull request
Dec 9, 2022
This changes the HLS parser so that the media playlists are only downloaded when the createSegmentIndex function for the associated stream is called. Because there is some important information about HLS streams that is stored inside the media playlist, this also changes the player to call createSegmentIndex on the initial variant earlier in the load process, to make sure that information is available in time. As of this change, we will now require HLS streams to be aligned (see video-dev#4308) for livestreams. VOD content can still be unaligned. Closes video-dev#1936
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will...
Ensure
changeType
is called in the correct scenarios, for example, if codec is the same than the first detected codec fromcreateSourceBuffers
.The problem is that:
createSourceBuffers
codecs info is stored.onBufferCodecs
the codec info is not overridden/stored.Resuming, this scenario will imply some errors, a use case example:
createSourceBuffers
is called withaudio/mp4
mp4a.40.2
onBufferCodecs
called withaudio/mp4
mp4a.40.5
OK
changeType
called because it differs frommp4a.40.2
onBufferCodecs
called withaudio/mp4
mp4a.40.5
WARNING unnecessary
changeType
called because it differs frommp4a.40.2
but codec is same than previousmp4a.40.5
onBufferCodecs
called withaudio/mp4
mp4a.40.2
ERROR
changeType
is NOT called because it's compared with originalmp4a.40.2
but it really differs from previous codecmp4a.40.5
Why is this Pull Request needed?
If
changeType
is not called we found that someVestel
devices are having issues while playing some streams.Also we'll remove some unnecessary calls to
changeType
when codec did not really changed.Are there any points in the code the reviewer needs to double check?
If you want we can add add the hls media url in the
tests/test-streams.js
commented in the issue?Resolves issues:
Fix issue #4307
Checklist