ws-audio2: audio/ac3 sniffs E-AC-3 too (loading one says UNSUPPORTED, not an unknown format); fixture tidy
This commit is contained in:
1 parent
2d99b9924a
commit
62aded60c0
3 files changed
+6
-8
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user