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 -1
View File
@@ -32,10 +32,11 @@ export type DecodeOptions = {
}
-- ------------------------------------------------------------------------------------------------ sniff
-- (E-AC-3 streams sniff too, so loading one says UNSUPPORTED instead of an unknown format)
function Ac3Format.sniff(r: Bytes.Reader): number
local b, p, limit = r.buf, r.pos, r.limit
local h = Ac3.header(b, p, limit)
if not h or h.bsid > 10 then
if not h then
return 0
end
local h2 = Ac3.header(b, p + h.frameSize, limit)