ws-audio2: lossless: allocation limits (WavPack frame n x channels, APE / TTA frame size: LIMIT above 2^24 samples)
This commit is contained in:
1 parent
085e385674
commit
00b36fa14a
3 files changed
+5
-2
No files matched your search
@@ -191,6 +191,9 @@ local function frame(self: Decoder, buf: buffer, blocks: { number }, cbuf: buffe
|
||||
end
|
||||
if n < 0 then
|
||||
n = h.samples
|
||||
if n * C > 16777216 then
|
||||
return nil, Err.new(Err.LIMIT, "a frame of " .. n .. " samples x " .. C .. " channels", at)
|
||||
end
|
||||
if #self.pcm < n * C then
|
||||
self.pcm = table.create(n * C, 0)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user