diff options
author | Max Kellermann <max@duempel.org> | 2014-08-23 13:31:11 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-23 13:39:00 +0200 |
commit | 1b6f7c3eb726046bb199a7cabad4ea32b09efddc (patch) | |
tree | b1afce43ede1b39c00910d927f9964d6d0db583f /src/decoder/plugins/DsfDecoderPlugin.cxx | |
parent | 67f0d26d17ce19b7e51d287b27512c435a2c206d (diff) | |
download | mpd-1b6f7c3eb726046bb199a7cabad4ea32b09efddc.tar.gz mpd-1b6f7c3eb726046bb199a7cabad4ea32b09efddc.tar.xz mpd-1b6f7c3eb726046bb199a7cabad4ea32b09efddc.zip |
decoder/dsf: eliminate another hard-coded stereo mode assumption
When calculating the upper bound using the "sample count" format
header, don't assume it's stereo.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/DsfDecoderPlugin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/plugins/DsfDecoderPlugin.cxx b/src/decoder/plugins/DsfDecoderPlugin.cxx index ba25cf140..d150d8146 100644 --- a/src/decoder/plugins/DsfDecoderPlugin.cxx +++ b/src/decoder/plugins/DsfDecoderPlugin.cxx @@ -167,7 +167,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is, bound, because some DSF files contain junk at the end of the "data" chunk */ const uint64_t samplecnt = dsf_fmt_chunk.scnt.Read(); - const offset_type playable_size = samplecnt * 2 / 8; + const offset_type playable_size = samplecnt * channels / 8; if (data_size > playable_size) data_size = playable_size; |