Closed Bug 1699434 Opened 3 years ago Closed 3 years ago

Do not filter AAC based on sample rate, instead let decoder creation fail if we have a rate we can't handle

Categories

(Core :: Audio/Video: Playback, enhancement, P2)

Desktop
Windows
enhancement

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

We currently filter AAC based on sample rate and will not try and create decoders if we do not receive a sample rate we expect to be supported[0]. However, following investigation in bug 1698639 it seems newer versions of Windows may support a wider range of sample rates.

We should remove the check and see if we can create a decoder instead. This will allow some users to play media with higher sample rates.

This will change the error that users see if they cannot play a file, but not in a meaningful way (IMO). The error will change from

NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm 

to

NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error creating decoder for audio/mp4a-latm

So users will not receive a harder to explain message.

It would be nice to improve on the error message so that it references the sample rate, bug 1698633 tracks having a better error message for this case.

[0] https://searchfox.org/mozilla-central/rev/f07a609a76136ef779c65185165ff5ac513cc172/dom/media/platforms/wmf/WMFDecoderModule.cpp#329-330

Summary: Do not filter AAC based on sample rate → Do not filter AAC based on sample rate let decoder creation fail if we have a rate we can't handle
Summary: Do not filter AAC based on sample rate let decoder creation fail if we have a rate we can't handle → Do not filter AAC based on sample rate, instead let decoder creation fail if we have a rate we can't handle

This will allow higher sample rate decoding when the platform supports it, and
will offer a similar error in cases where the platform does not.

Depends on D109380

Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37f5052c1846
Add aac audio test files for different sample rates. r=alwu
https://hg.mozilla.org/integration/autoland/rev/0913382ff7cb
Remove code that blocks WMF AAC decoding based on sample rate. r=alwu
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: