Bug 1407063 - Fix non-unified build in DecoderData.cpp. r?gerald draft
authorPhilippe Normand <philn@igalia.com>
Thu, 05 Oct 2017 15:53:07 +0200
changeset 677018 19585ea3eef6419ab1ed7034d236121ff28175f6
parent 677017 3fbc459d6f3104f169e235a8905a8b1a02cb0ebb
child 677019 82b8c11aa5b6e324d5d0e03c358d0186cb60dae3
push id83665
push userbmo:cpearce@mozilla.com
push dateMon, 09 Oct 2017 21:50:20 +0000
reviewersgerald
bugs1407063
milestone58.0a1
Bug 1407063 - Fix non-unified build in DecoderData.cpp. r?gerald EndianUtils.h include was missing and some function calls required explicit mention to the mozilla namespace. MozReview-Commit-ID: CFsr7RJ7IGx
media/libstagefright/binding/DecoderData.cpp
--- a/media/libstagefright/binding/DecoderData.cpp
+++ b/media/libstagefright/binding/DecoderData.cpp
@@ -6,16 +6,17 @@
 #include "mp4_demuxer/AnnexB.h"
 #include "mp4_demuxer/ByteReader.h"
 #include "mp4_demuxer/DecoderData.h"
 #include <media/stagefright/foundation/ABitReader.h>
 #include "media/stagefright/MetaData.h"
 #include "media/stagefright/MediaDefs.h"
 #include "media/stagefright/Utils.h"
 #include "mozilla/ArrayUtils.h"
+#include "mozilla/EndianUtils.h"
 #include "include/ESDS.h"
 #include "VideoUtils.h"
 
 // OpusDecoder header is really needed only by MP4 in rust
 #include "OpusDecoder.h"
 #include "mp4parse.h"
 
 using namespace stagefright;
@@ -199,18 +200,18 @@ MP4AudioInfo::Update(const mp4parse_trac
   if (track->codec == mp4parse_codec_OPUS) {
     mMimeType = NS_LITERAL_CSTRING("audio/opus");
     // The Opus decoder expects the container's codec delay or
     // pre-skip value, in microseconds, as a 64-bit int at the
     // start of the codec-specific config blob.
     MOZ_ASSERT(audio->extra_data.data);
     MOZ_ASSERT(audio->extra_data.length >= 12);
     uint16_t preskip =
-      LittleEndian::readUint16(audio->extra_data.data + 10);
-    OpusDataDecoder::AppendCodecDelay(mCodecSpecificConfig,
+      mozilla::LittleEndian::readUint16(audio->extra_data.data + 10);
+    mozilla::OpusDataDecoder::AppendCodecDelay(mCodecSpecificConfig,
         mozilla::FramesToUsecs(preskip, 48000).value());
   } else if (track->codec == mp4parse_codec_AAC) {
     mMimeType = MEDIA_MIMETYPE_AUDIO_AAC;
   } else if (track->codec == mp4parse_codec_FLAC) {
     mMimeType = MEDIA_MIMETYPE_AUDIO_FLAC;
   } else if (track->codec == mp4parse_codec_MP3) {
     mMimeType = MEDIA_MIMETYPE_AUDIO_MPEG;
   }