ws-audio2: audio/ac3 sniffs E-AC-3 too (loading one says UNSUPPORTED, not an unknown format); fixture tidy

This commit is contained in:
4DBug committed 2026-10-31 14:52:41 -05:00
1 parent 2d99b9924a
commit 62aded60c0
3 files changed
+6 -8

No files matched your search

+2
View File
@@ -128,6 +128,8 @@ do
local eac3 = "\11\119\0\255\128\128" .. string.rep("\0", 506)
_, e = Ac3F.decode(reader(eac3 .. eac3))
t:check(e and e.code == Err.UNSUPPORTED, "E-AC-3: " .. tostring(e))
local _, fe = F.audio.load(buffer.fromstring(eac3 .. eac3))
t:check(fe and fe.code == Err.UNSUPPORTED, "E-AC-3 through the api: " .. tostring(fe))
-- a flipped bit in the middle of the first frame: the CRC catches it
local bad = string.sub(c, 1, 300) .. string.char(bit32.bxor(string.byte(c, 301), 4)) .. string.sub(c, 302)
_, e = Ac3F.decode(reader(bad))