mirror of
https://github.com/wader/fq.git
synced 2024-12-25 22:34:14 +03:00
Merge pull request #84 from wader/flac-dont-allow-zero-samplesize
flac: Don't allow zero subframe sample size
This commit is contained in:
commit
51f958278e
@ -378,8 +378,8 @@ func frameDecode(d *decode.D, in interface{}) interface{} {
|
||||
}
|
||||
|
||||
subframeSampleSize := sampleSize - wastedBitsK
|
||||
if subframeSampleSize < 0 {
|
||||
d.Fatalf("negative subframeSampleSize %d", subframeSampleSize)
|
||||
if subframeSampleSize < 1 {
|
||||
d.Fatalf("subframeSampleSize %d < 1", subframeSampleSize)
|
||||
}
|
||||
// if channel is side, add en extra sample bit
|
||||
// https://github.com/xiph/flac/blob/37e675b777d4e0de53ac9ff69e2aea10d92e729c/src/libFLAC/stream_decoder.c#L2040
|
||||
|
Loading…
Reference in New Issue
Block a user