Corrupt HEVC decoding on Android
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
People
(Reporter: pehrsons, Assigned: jhlin)
References
Details
(Keywords: webcompat:platform-bug)
User Story
user-impact-score:300
Attachments
(4 files)
Tested in Firefox 141 release and the late Nightly from Aug 3 2025.
First found when playing the video on https://www.svt.se/nyheter/lokalt/vast/sa-drar-stormen-floris-in-over-landet-under-tisdagen.
On my Samsung Galaxy S22 (Exynos 2200 with an AMD RDNA 2 based GPU) I see corrupt video at first, then the device does a full reset and starts booting up automatically.
A colleague with a Google Pixel 7 Pro (Mali GPU) saw corrupt video with no reset.
jimm's Samsung Galaxy Z Flip4 (Adreno GPU) saw corrupt video with no reset.
Sometimes the video plays. My unconfirmed hypothesis is that the HEVC hw decoder is unavailable so we play the AVC stream instead.
I enabled media playback logging and captured it through logcat in a scenario that led to a full reset, see that file attached.
Looking at the log and the DASH manifest, this appears to be the stream causing problems:
<Representation id="2" bandwidth="959867" width="540" height="540" codecs="hvc1.2.4.L123.90" sar="1:1" mimeType="video/mp4">
<SupplementalProperty schemeIdUri="urn:se:svt:average-bitrate:2024" value="625231"/>
<SegmentTemplate initialization="cmaf-video-hevc-540x540p25-625/cmaf-video-hevc-540x540p25-625-init.mp4" media="cmaf-video-hevc-540x540p25-625/cmaf-video-hevc-540x540p25-625-$Number$.mp4" startNumber="1" timescale="12800">
<SegmentTimeline>
<S t="0" d="49152" r="8"/>
<S t="442368" d="9728"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
The full URL for the init segment is https://ed12.cdn.svt.se/d0/world/20250805/80b8a341-5e4f-4365-a178-01b50f742acb/cmaf-video-hevc-540x540p25-625/cmaf-video-hevc-540x540p25-625-init.mp4.
Given this, I also tested some other HEVC material and found another repro case in the DASH reference player.
STR:
- Click
Load. - In the video controls, select manually the lowest bitrate stream.
- Wait a minute or so.
Note this case also fails on macOS with MEDIA_ERR_DECODE (void mozilla::AppleVTDecoder::OnDecodeError(OSStatus): OnDecodeError:ffffbae2) which is kVTVideoDecoderReferenceMissingErr, so perhaps the root cause is on our end in platform independent code.
| Reporter | ||
Comment 1•9 months ago
|
||
As requested on chat.m.o I have run adb shell dumpsys media.player on the Galaxy S22.
| Reporter | ||
Comment 2•9 months ago
|
||
Loading the svt page in Chrome shows it downloading first the 234x234 HEVC stream, then switching to the 1080x1080 HEVC stream. I assume they're using the hw decoder or they should have picked an AVC stream instead.
| Reporter | ||
Comment 3•9 months ago
|
||
SVT say there were no recent changes on their end, and they have been using HEVC for some time. Plausibly we may be looking at a 141 regression.
Comment 4•9 months ago
|
||
The severity field is not set for this bug.
:jimm, could you have a look please?
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 5•8 months ago
|
||
The latest I heard from SVT was that they have been using HEVC for some time on their VOD service svtplay.se. They ran an experiment earlier in summer with HEVC for news videos on svt.se, which was when I started seeing issues. I haven't used svtplay.se in Firefox on Android which is likely why this didn't come up before.
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Comment 7•5 months ago
|
||
| Assignee | ||
Comment 8•5 months ago
|
||
It looks like the websites serve HEVC video with different resolutions specified in initialization segments but HEVChangeMonitor::CheckForChange() doesn't check the changes.
Comment 10•5 months ago
|
||
| bugherder | ||
| Reporter | ||
Comment 11•5 months ago
|
||
Firefox Nightly on Android works on svt.se now. Would you consider an uplift?
| Reporter | ||
Comment 12•5 months ago
|
||
I am assuming this only affects Android. The patch seems independent of platform though. Please update the tracking if it affects desktop too.
| Assignee | ||
Comment 13•5 months ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #12)
I am assuming this only affects Android. The patch seems independent of platform though. Please update the tracking if it affects desktop too.
It affects "recyclable" video decoders. AFAIK only enabled on Android.
| Assignee | ||
Comment 14•5 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D276499
Updated•5 months ago
|
Comment 15•5 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Sites that serving HEVC with dynamic resolutions could show broken images.
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Not risky because the change is straightforward.
- String changes made/needed: N/A
- Is Android affected?: yes
Updated•5 months ago
|
Updated•5 months ago
|
Comment 16•5 months ago
|
||
| uplift | ||
Comment 17•5 months ago
|
||
Verified as fixed on the latest Nightly (148.0a1) and latest Beta (147.0b6) builds.
The video from the description plays correctly.
Device used: Samsung Galaxy S25 Ultra (Android 15).
Marking the ticket as verified on 147 and 148.
Updated•5 months ago
|
Description
•