Bug 1299735: [FLAC] Fix reading of bit depth. r=JamesCheng
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 01 Sep 2016 15:43:38 +1000
changeset 312238 8047f5bd02f8e66074d3e070d74e22fc2a7c84c5
parent 312237 fcdf91897246ff696bce33d4b7bc72a2011527c3
child 312239 5d8d8e09acfa0ca1ccef77ede3d0095ac0a4b2f1
push id30636
push userryanvm@gmail.com
push dateThu, 01 Sep 2016 16:12:03 +0000
treeherdermozilla-central@4dd14de3fa42 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamesCheng
bugs1299735
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1299735: [FLAC] Fix reading of bit depth. r=JamesCheng MozReview-Commit-ID: 8djHfIRY4kv
dom/media/flac/FlacFrameParser.cpp
--- a/dom/media/flac/FlacFrameParser.cpp
+++ b/dom/media/flac/FlacFrameParser.cpp
@@ -127,17 +127,17 @@ FlacFrameParser::DecodeHeaderBlock(const
       uint32_t sampleRate = (blob >> 44) & BITMASK(20);
       if (!sampleRate) {
         return false;
       }
       uint32_t numChannels = ((blob >> 41) & BITMASK(3)) + 1;
       if (numChannels > FLAC_MAX_CHANNELS) {
         return false;
       }
-      uint32_t bps = ((blob >> 38) & BITMASK(5)) + 1;
+      uint32_t bps = ((blob >> 36) & BITMASK(5)) + 1;
       if (bps > 24) {
         return false;
       }
       mNumFrames = blob & BITMASK(36);
 
       mInfo.mMimeType = "audio/flac";
       mInfo.mRate = sampleRate;
       mInfo.mChannels = numChannels;