Subject: mullvadbrowser & torbrowser can’t play AAC LATM streams

From: Ian Eure <[email-masked]>
Date: Sat, 05 Apr 2025 11:51:21 -0700

When testing patches for #77460 and #77461, I noticed that neither 
mullvad nor torbrowser can play live videos.  ex. if you launch 
either browser, navigate to youtube.com, search "live" and click 
on any video with the red "live" badge, you get a "Your browser 
can’t play this video" error.

If I launch Mullvad from a shell, I see this output:

[Child 22618, MediaDecoderStateMachine #1] WARNING: 
Decoder=7efdca045b00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR 
(0x806e0005) - Error no decoder found for audio/mp4a-latm: file 
/tmp/guix-build-mullvadbrowser-14.0.7.drv-0/firefox-mullvad-browser-128.8.0esr-14.0-1-build2/dom/media/MediaDecoderStateMachineBase.cpp:167

This seems related to #72265, which was a report about LibreWolf 
not enabling hardware acceleration for video decoding; after 
applying the provided patch, the same problem resulted.  I think 
the same situation is happening with these browsers.  I don’t have 
a satisfying fix; LW still has no hwaccel support, and neither 
does Firefox in nonguix.

Mullvad’s about:support claims AAC is supported with hardware 
acceleration.  LATM is a container format[1], not a codec, and 
doesn’t show up anywhere on that page.  Per the FFmpeg changelog, 
LATM support was added to in version 0.9(!), and doesn’t appear to 
have a configure flag to control whether it’s enabled or not.  So 
it’s not clear to me why Firefoxen aren’t able to decode these 
streams.

Thanks,
  -- Ian

[1]: 
https://en.wikipedia.org/wiki/Advanced_Audio_Coding#Container_formats