fix: detect access units in YouTube HLS AVC1 path#24
Merged
InfinityLoop1308 merged 1 commit intoInfinityLoop1308:devfrom Apr 12, 2026
Merged
fix: detect access units in YouTube HLS AVC1 path#24InfinityLoop1308 merged 1 commit intoInfinityLoop1308:devfrom
InfinityLoop1308 merged 1 commit intoInfinityLoop1308:devfrom
Conversation
Owner
|
Thanks a lot for the fix! I saw all the comparative testing you did. Very solid work. |
7 tasks
This file contains hidden or 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
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.
Summary
This PR fixes severe AVC1/H264 stutter on affected Pixel devices by changing YouTube HLS extractor configuration in one localized code path.
The patch is small because the root cause is localized: enabling access-unit detection in the YouTube HLS TS parsing path resolves the reproduced stutter behavior.
Related reports
Problem
On affected Pixel devices, YouTube AVC1/H264 playback can stutter heavily (audio remains in sync), with bursty dropped-frame patterns.
Observed decoder path on repro device:
c2.exynos.h264.decoder.Investigation highlights
c2.qti.avc.decoder): same stream family smoothCode change
File:
app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.javaChange in
getYoutubeHlsMediaSourceFactory():DefaultTsPayloadReaderFactory.FLAG_DETECT_ACCESS_UNITSDefaultHlsExtractorFactory(payloadReaderFlags, true)This adjusts how H264 TS payload is split into access units before decoder input.
Validation (A/B, same repro setup)
0 / 0 / 0 / 0 / 0 / 0 / 0dropped frames (7 runs)13 / 312 / 573dropped frames (3 runs)Also validated in continuous real-device usage after patch: playback remained smooth.
Scope
Build verification
:app:assembleDebug