[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/esr24] Bug 966311 - Calculate frame size for stereo wave. r=doublec, a=sledru



commit 0109abd08387a67efbda9a4d02c44f1c177efb8c
Author: Ralph Giles <giles@xxxxxxxxxxx>
Date:   Fri Jan 31 13:50:45 2014 -0800

    Bug 966311 - Calculate frame size for stereo wave. r=doublec, a=sledru
    
    We were assuming 8-bit WAVE files were mono-only, but this is
    not necessarily the case.
---
 content/media/wave/WaveReader.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/media/wave/WaveReader.cpp b/content/media/wave/WaveReader.cpp
index 28aec46..ce71ea6 100644
--- a/content/media/wave/WaveReader.cpp
+++ b/content/media/wave/WaveReader.cpp
@@ -424,7 +424,7 @@ WaveReader::LoadFormatChunk(uint32_t aChunkSize)
   // Make sure metadata is fairly sane.  The rate check is fairly arbitrary,
   // but the channels check is intentionally limited to mono or stereo
   // because that's what the audio backend currently supports.
-  unsigned int actualFrameSize = sampleFormat == 8 ? 1 : 2 * channels;
+  unsigned int actualFrameSize = (sampleFormat == 8 ? 1 : 2) * channels;
   if (rate < 100 || rate > 96000 ||
       channels < 1 || channels > MAX_CHANNELS ||
       (frameSize != 1 && frameSize != 2 && frameSize != 4) ||



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits