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
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user