Closed Bug 1787159 Opened 2 years ago Closed 2 years ago

The media sniffer sometimes fails to sniff AAC in ADTS when the AAC stream has more than two channels

Categories

(Core :: Audio/Video: Playback, defect)

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: padenot, Assigned: padenot)

Details

Attachments

(2 files, 2 obsolete files)

We cap the sniffing at 512 bytes, but testing by encoding a number of files, we can have absolutely huge frame size, e.g.:

sox -V -r 48000 -n -b 16 -c 8 sin1k.wav synth 30 sin 1000 vol -10dB && ffmpeg -i sin1k.wav -ar 8000 -b:a 320000 out.aac

results in a file that, according to our ADTS demuxer, has a first frame that is 4277 bytes, well beyond the 512 bytes cap. It's an 8 channels AAC file, CBR at 320kbps, 8000Hz sample-rate, which is kind of a weird file, but easy to make.

I'm going to cap the sniffing at 8k.

Sometimes, media needs more than 512 bytes to determine the content type.

Depends on D155586

Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1e7451eb44d9
Fix sniffing for AAC in ADTS with big AAC frames. r=alwu
https://hg.mozilla.org/integration/autoland/rev/fe795b47f5ea
Test that AAC packets in ADTS with big frames can be sniffed. r=alwu
https://hg.mozilla.org/integration/autoland/rev/99c8eac7322c
It can be necessary to sniff more data in some cases. r=necko-reviewers,valentin
https://hg.mozilla.org/integration/autoland/rev/bf145275b8a9
Test that a 8 channels ADTS file with large AAC frames can be decoded. r=alwu

Backed out 4 changesets (bug 1787159) for causing mochitest failures in dom/media/webaudio/test/test_decodeMultichannel.html

Backout link: https://hg.mozilla.org/integration/autoland/rev/417e3f05462077748f8dcf1a2c453236f6197627

Push with failures

Failure log mda

LE. Failure log xpc

TEST-UNEXPECTED-FAIL | dom/media/webaudio/test/test_decodeMultichannel.html | Decoding 8kHz-320kbps-8ch.aac failed)
Flags: needinfo?(padenot)

Hrm the MFT for AAC only support 6 channels, too bad. I'm going to lower the number of channels here.

Flags: needinfo?(padenot)
Attachment #9291553 - Attachment description: Bug 1787159 - Test that a 8 channels ADTS file with large AAC frames can be decoded. r?alwu → Bug 1787159 - Test that a 6 channels ADTS file with large AAC frames can be decoded. r?alwu
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ae487b3afeb
Fix sniffing for AAC in ADTS with big AAC frames. r=alwu
https://hg.mozilla.org/integration/autoland/rev/c095a999a3db
Test that AAC packets in ADTS with big frames can be sniffed. r=alwu
https://hg.mozilla.org/integration/autoland/rev/a78016cc2812
It can be necessary to sniff more data in some cases. r=necko-reviewers,valentin
https://hg.mozilla.org/integration/autoland/rev/8bbff0f18e88
Test that a 6 channels ADTS file with large AAC frames can be decoded. r=alwu

Backed out for causing AAC related build bustages

Backout link

Push with failures

Failure log

Failure line: package-tests> Error: Symlink target path does not exist: /builds/worker/checkouts/gecko/toolkit/components/mediasniffer/test/unit/data/8kHz-320kbps-6ch.aac

Flags: needinfo?(padenot)
Regressions: 1789431
No longer regressions: 1789431
Flags: needinfo?(padenot)
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ff8337743bd
Fix sniffing for AAC in ADTS with big AAC frames. r=alwu
https://hg.mozilla.org/integration/autoland/rev/ad0cc19207ce
Test that AAC packets in ADTS with big frames can be sniffed. r=alwu
https://hg.mozilla.org/integration/autoland/rev/0f9e3836fef5
It can be necessary to sniff more data in some cases. r=necko-reviewers,valentin
https://hg.mozilla.org/integration/autoland/rev/333d1c3b1139
Test that a 6 channels ADTS file with large AAC frames can be decoded. r=alwu
Attachment #9291552 - Attachment is obsolete: true
Attachment #9291551 - Attachment is obsolete: true
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03d47242ec79
Fix sniffing for AAC in ADTS with big AAC frames. r=alwu
https://hg.mozilla.org/integration/autoland/rev/ce530399c45a
Test that a 6 channels ADTS file with large AAC frames can be decoded. r=alwu
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Flags: needinfo?(padenot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: