e75128
diff -up mozilla-aurora/config/external/moz.build.remove-ogg mozilla-aurora/config/external/moz.build
e75128
--- mozilla-aurora/config/external/moz.build.remove-ogg	2014-05-06 13:17:17.000000000 +0200
e75128
+++ mozilla-aurora/config/external/moz.build	2014-06-03 13:51:14.450340480 +0200
e75128
@@ -33,14 +33,15 @@ if CONFIG['MOZ_WEBM_ENCODER']:
e75128
 if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
e75128
     external_dirs += ['media/libvpx']
e75128
 
e75128
+if CONFIG['MOZ_OGG']:
e75128
+    external_dirs += ['media/libogg', 'media/libtheora']
e75128
+
e75128
 if not CONFIG['MOZ_NATIVE_PNG']:
e75128
     external_dirs += ['media/libpng']
e75128
 
e75128
 external_dirs += [
e75128
     'media/kiss_fft',
e75128
     'media/libcubeb',
e75128
-    'media/libogg',
e75128
-    'media/libtheora',
e75128
     'media/libspeex_resampler',
e75128
     'media/libsoundtouch',
e75128
 ]
e75128
diff -up mozilla-aurora/configure.in.remove-ogg mozilla-aurora/configure.in
e75128
--- mozilla-aurora/configure.in.remove-ogg	2014-05-06 13:17:17.000000000 +0200
e75128
+++ mozilla-aurora/configure.in	2014-06-03 13:51:14.452340483 +0200
e75128
@@ -3938,6 +3938,7 @@ MOZ_FEEDS=1
e75128
 MOZ_WEBAPP_RUNTIME=
e75128
 MOZ_JSDEBUGGER=1
e75128
 MOZ_AUTH_EXTENSION=1
e75128
+MOZ_OGG=1
e75128
 MOZ_RAW=
e75128
 MOZ_VORBIS=
e75128
 MOZ_TREMOR=
e75128
@@ -5191,25 +5192,37 @@ fi
e75128
 
e75128
 AC_SUBST(MOZ_RAW)
e75128
 
e75128
-dnl Checks for __attribute__(aligned()) directive need by libogg
e75128
-AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
e75128
-    [ac_cv_c_attribute_aligned],
e75128
-    [ac_cv_c_attribute_aligned=0
e75128
-     CFLAGS_save="${CFLAGS}"
e75128
-     CFLAGS="${CFLAGS} -Werror"
e75128
-     for ac_cv_c_attr_align_try in 64 32 16 8; do
e75128
-       echo "trying $ac_cv_c_attr_align_try"
e75128
-       AC_TRY_COMPILE([],
e75128
-                      [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
e75128
-                      [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
e75128
-       if test "$ac_cv_c_attribute_aligned" != 0; then
e75128
-         break;
e75128
-       fi
e75128
-     done
e75128
-       CFLAGS="${CFLAGS_save}"])
e75128
-if test "${ac_cv_c_attribute_aligned}" != "0"; then
e75128
-  AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
e75128
-                     [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
e75128
+dnl ========================================================
e75128
+dnl = Disable Ogg Codecs
e75128
+dnl ========================================================
e75128
+MOZ_ARG_DISABLE_BOOL(ogg,
e75128
+[  --disable-ogg           Disable support for OGG media (Theora video and Vorbis audio)],
e75128
+    MOZ_OGG=,
e75128
+    MOZ_OGG=1)
e75128
+
e75128
+if test -n "$MOZ_OGG"; then
e75128
+    AC_DEFINE(MOZ_OGG)
e75128
+
e75128
+    dnl Checks for __attribute__(aligned()) directive
e75128
+    AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
e75128
+        [ac_cv_c_attribute_aligned],
e75128
+        [ac_cv_c_attribute_aligned=0
e75128
+         CFLAGS_save="${CFLAGS}"
e75128
+         CFLAGS="${CFLAGS} -Werror"
e75128
+         for ac_cv_c_attr_align_try in 64 32 16 8; do
e75128
+           echo "trying $ac_cv_c_attr_align_try"
e75128
+           AC_TRY_COMPILE([],
e75128
+                          [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
e75128
+                          [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
e75128
+           if test "$ac_cv_c_attribute_aligned" != 0; then
e75128
+             break;
e75128
+           fi
e75128
+         done
e75128
+           CFLAGS="${CFLAGS_save}"])
e75128
+    if test "${ac_cv_c_attribute_aligned}" != "0"; then
e75128
+      AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
e75128
+                         [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
e75128
+    fi
e75128
 fi
e75128
 
e75128
 dnl ========================================================
e75128
@@ -5426,7 +5439,7 @@ AC_SUBST(MOZ_NATIVE_LIBVPX)
e75128
 AC_SUBST(MOZ_LIBVPX_CFLAGS)
e75128
 AC_SUBST(MOZ_LIBVPX_LIBS)
e75128
 
e75128
-if test "$MOZ_WEBM"; then
e75128
+if test "$MOZ_WEBM" -o "$MOZ_OGG"; then
e75128
     if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
e75128
         MOZ_VORBIS=1
e75128
     else
e75128
@@ -5533,6 +5546,15 @@ dnl ====================================
e75128
 dnl = Handle dependent MEDIA defines
e75128
 dnl ========================================================
e75128
 
e75128
+if test -n "$MOZ_OPUS" -a -z "$MOZ_OGG"; then
e75128
+    AC_MSG_ERROR([MOZ_OPUS requires MOZ_OGG which is disabled.])
e75128
+fi
e75128
+
e75128
+if test -n "$MOZ_VORBIS" -a -z "$MOZ_OGG"; then
e75128
+    AC_MSG_ERROR([MOZ_VORBIS requires MOZ_OGG which is disabled.
e75128
+Note that you need vorbis support for WebM playback.])
e75128
+fi
e75128
+
e75128
 if test -n "$MOZ_VORBIS" -a -n "$MOZ_TREMOR"; then
e75128
     AC_MSG_ERROR([MOZ_VORBIS and MOZ_TREMOR are mutually exclusive!  The build system should not allow them both to be set, but they are.  Please file a bug at https://bugzilla.mozilla.org/])
e75128
 fi
e75128
@@ -8842,6 +8864,7 @@ AC_SUBST(MOZ_APPLEMEDIA)
e75128
 AC_SUBST(MOZ_OMX_PLUGIN)
e75128
 AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
e75128
 AC_SUBST(MOZ_VPX)
e75128
+AC_SUBST(MOZ_OGG)
e75128
 AC_SUBST(VPX_AS)
e75128
 AC_SUBST(VPX_ASFLAGS)
e75128
 AC_SUBST(VPX_DASH_C_FLAG)
e75128
diff -up mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp.remove-ogg mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp
e75128
--- mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp.remove-ogg	2014-05-06 13:17:19.000000000 +0200
e75128
+++ mozilla-aurora/content/html/content/src/HTMLAudioElement.cpp	2014-06-03 13:51:14.452340483 +0200
e75128
@@ -81,12 +81,16 @@ nsresult HTMLAudioElement::SetAcceptHead
e75128
 #ifdef MOZ_WEBM
e75128
       "audio/webm,"
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
       "audio/ogg,"
e75128
+#endif
e75128
 #ifdef MOZ_WAVE
e75128
       "audio/wav,"
e75128
 #endif
e75128
       "audio/*;q=0.9,"
e75128
+#ifdef MOZ_OGG
e75128
       "application/ogg;q=0.7,"
e75128
+#endif
e75128
       "video/*;q=0.6,*/*;q=0.5");
e75128
 
e75128
     return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
e75128
diff -up mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp.remove-ogg mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp
e75128
--- mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp.remove-ogg	2014-05-06 13:17:19.000000000 +0200
e75128
+++ mozilla-aurora/content/html/content/src/HTMLVideoElement.cpp	2014-06-03 13:51:14.452340483 +0200
e75128
@@ -136,9 +136,13 @@ nsresult HTMLVideoElement::SetAcceptHead
e75128
 #ifdef MOZ_WEBM
e75128
       "video/webm,"
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
       "video/ogg,"
e75128
+#endif
e75128
       "video/*;q=0.9,"
e75128
+#ifdef MOZ_OGG
e75128
       "application/ogg;q=0.7,"
e75128
+#endif
e75128
       "audio/*;q=0.6,*/*;q=0.5");
e75128
 
e75128
   return aChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
e75128
diff -up mozilla-aurora/content/media/DecoderTraits.cpp.remove-ogg mozilla-aurora/content/media/DecoderTraits.cpp
e75128
--- mozilla-aurora/content/media/DecoderTraits.cpp.remove-ogg	2014-05-06 13:17:20.000000000 +0200
e75128
+++ mozilla-aurora/content/media/DecoderTraits.cpp	2014-06-03 13:51:14.452340483 +0200
e75128
@@ -13,8 +13,10 @@
e75128
 #include "MediaPluginHost.h"
e75128
 #endif
e75128
 
e75128
+#ifdef MOZ_OGG
e75128
 #include "OggDecoder.h"
e75128
 #include "OggReader.h"
e75128
+#endif
e75128
 #ifdef MOZ_WAVE
e75128
 #include "WaveDecoder.h"
e75128
 #include "WaveReader.h"
e75128
@@ -100,6 +102,7 @@ IsRawType(const nsACString& aType)
e75128
 }
e75128
 #endif
e75128
 
e75128
+#ifdef MOZ_OGG
e75128
 // See http://www.rfc-editor.org/rfc/rfc5334.txt for the definitions
e75128
 // of Ogg media types and codec types
e75128
 static const char* const gOggTypes[4] = {
e75128
@@ -131,6 +134,7 @@ IsOggType(const nsACString& aType)
e75128
 
e75128
   return CodecListContains(gOggTypes, aType);
e75128
 }
e75128
+#endif
e75128
 
e75128
 #ifdef MOZ_WAVE
e75128
 // See http://www.rfc-editor.org/rfc/rfc2361.txt for the definitions
e75128
@@ -199,8 +203,10 @@ IsGStreamerSupportedType(const nsACStrin
e75128
   if (IsWebMType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false))
e75128
     return false;
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
   if (IsOggType(aMimeType) && !Preferences::GetBool("media.prefer-gstreamer", false))
e75128
     return false;
e75128
+#endif
e75128
 
e75128
   return GStreamerDecoder::CanHandleMediaType(aMimeType, nullptr);
e75128
 }
e75128
@@ -370,10 +376,12 @@ DecoderTraits::CanHandleMediaType(const
e75128
     result = CANPLAY_MAYBE;
e75128
   }
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
   if (IsOggType(nsDependentCString(aMIMEType))) {
e75128
     codecList = MediaDecoder::IsOpusEnabled() ? gOggCodecsWithOpus : gOggCodecs;
e75128
     result = CANPLAY_MAYBE;
e75128
   }
e75128
+#endif
e75128
 #ifdef MOZ_WAVE
e75128
   if (IsWaveType(nsDependentCString(aMIMEType))) {
e75128
     codecList = gWaveCodecs;
e75128
@@ -479,10 +487,12 @@ InstantiateDecoder(const nsACString& aTy
e75128
     return decoder.forget();
e75128
   }
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
   if (IsOggType(aType)) {
e75128
     decoder = new OggDecoder();
e75128
     return decoder.forget();
e75128
   }
e75128
+#endif
e75128
 #ifdef MOZ_WAVE
e75128
   if (IsWaveType(aType)) {
e75128
     decoder = new WaveDecoder();
e75128
@@ -587,9 +597,11 @@ MediaDecoderReader* DecoderTraits::Creat
e75128
     decoderReader = new RawReader(aDecoder);
e75128
   } else
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
   if (IsOggType(aType)) {
e75128
     decoderReader = new OggReader(aDecoder);
e75128
   } else
e75128
+#endif
e75128
 #ifdef MOZ_WAVE
e75128
   if (IsWaveType(aType)) {
e75128
     decoderReader = new WaveReader(aDecoder);
e75128
@@ -642,7 +654,9 @@ MediaDecoderReader* DecoderTraits::Creat
e75128
 bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
e75128
 {
e75128
   return
e75128
+#ifdef MOZ_OGG
e75128
     IsOggType(aType) ||
e75128
+#endif
e75128
 #ifdef MOZ_OMX_DECODER
e75128
     // We support amr inside WebApps on firefoxOS but not in general web content.
e75128
     // Ensure we dont create a VideoDocument when accessing amr URLs directly.
e75128
diff -up mozilla-aurora/content/media/encoder/MediaEncoder.cpp.remove-ogg mozilla-aurora/content/media/encoder/MediaEncoder.cpp
e75128
--- mozilla-aurora/content/media/encoder/MediaEncoder.cpp.remove-ogg	2014-05-06 13:17:20.000000000 +0200
e75128
+++ mozilla-aurora/content/media/encoder/MediaEncoder.cpp	2014-06-03 13:51:14.453340485 +0200
e75128
@@ -9,7 +9,9 @@
e75128
 #include "prlog.h"
e75128
 #include "mozilla/Preferences.h"
e75128
 
e75128
+#ifdef MOZ_OGG
e75128
 #include "OggWriter.h"
e75128
+#endif
e75128
 #ifdef MOZ_OPUS
e75128
 #include "OpusTrackEncoder.h"
e75128
 
e75128
@@ -133,6 +135,7 @@ MediaEncoder::CreateEncoder(const nsAStr
e75128
     mimeType = NS_LITERAL_STRING(AUDIO_3GPP);
e75128
   }
e75128
 #endif // MOZ_OMX_ENCODER
e75128
+#ifdef MOZ_OGG
e75128
   else if (MediaDecoder::IsOggEnabled() && MediaDecoder::IsOpusEnabled() &&
e75128
            (aMIMEType.EqualsLiteral(AUDIO_OGG) ||
e75128
            (aTrackTypes & ContainerWriter::CREATE_AUDIO_TRACK))) {
e75128
@@ -142,6 +145,7 @@ MediaEncoder::CreateEncoder(const nsAStr
e75128
     NS_ENSURE_TRUE(audioEncoder, nullptr);
e75128
     mimeType = NS_LITERAL_STRING(AUDIO_OGG);
e75128
   }
e75128
+#endif  // MOZ_OGG
e75128
   else {
e75128
     LOG(PR_LOG_ERROR, ("Can not find any encoder to record this media stream"));
e75128
     return nullptr;
e75128
diff -up mozilla-aurora/content/media/MediaDecoder.cpp.remove-ogg mozilla-aurora/content/media/MediaDecoder.cpp
e75128
--- mozilla-aurora/content/media/MediaDecoder.cpp.remove-ogg	2014-05-06 13:17:20.000000000 +0200
e75128
+++ mozilla-aurora/content/media/MediaDecoder.cpp	2014-06-03 13:51:14.453340485 +0200
e75128
@@ -1653,6 +1653,7 @@ MediaDecoder::IsRawEnabled()
e75128
 }
e75128
 #endif
e75128
 
e75128
+#ifdef MOZ_OGG
e75128
 bool
e75128
 MediaDecoder::IsOpusEnabled()
e75128
 {
e75128
@@ -1668,6 +1669,7 @@ MediaDecoder::IsOggEnabled()
e75128
 {
e75128
   return Preferences::GetBool("media.ogg.enabled");
e75128
 }
e75128
+#endif
e75128
 
e75128
 #ifdef MOZ_WAVE
e75128
 bool
e75128
diff -up mozilla-aurora/content/media/MediaDecoder.h.remove-ogg mozilla-aurora/content/media/MediaDecoder.h
e75128
--- mozilla-aurora/content/media/MediaDecoder.h.remove-ogg	2014-05-06 13:17:20.000000000 +0200
e75128
+++ mozilla-aurora/content/media/MediaDecoder.h	2014-06-03 13:51:14.453340485 +0200
e75128
@@ -844,8 +844,10 @@ public:
e75128
   static bool IsRawEnabled();
e75128
 #endif
e75128
 
e75128
+#ifdef MOZ_OGG
e75128
   static bool IsOggEnabled();
e75128
   static bool IsOpusEnabled();
e75128
+#endif
e75128
 
e75128
 #ifdef MOZ_WAVE
e75128
   static bool IsWaveEnabled();
e75128
diff -up mozilla-aurora/content/media/moz.build.remove-ogg mozilla-aurora/content/media/moz.build
e75128
--- mozilla-aurora/content/media/moz.build.remove-ogg	2014-05-06 13:17:20.000000000 +0200
e75128
+++ mozilla-aurora/content/media/moz.build	2014-06-03 13:51:14.453340485 +0200
e75128
@@ -7,7 +7,6 @@
e75128
 PARALLEL_DIRS += [
e75128
   'encoder',
e75128
   'mediasource',
e75128
-  'ogg',
e75128
   'webaudio',
e75128
   'webvtt'
e75128
 ]
e75128
@@ -17,6 +16,9 @@ TEST_TOOL_DIRS += ['compiledtest']
e75128
 if CONFIG['MOZ_RAW']:
e75128
     PARALLEL_DIRS += ['raw']
e75128
 
e75128
+if CONFIG['MOZ_OGG']:
e75128
+    PARALLEL_DIRS += ['ogg']
e75128
+
e75128
 if CONFIG['MOZ_WAVE']:
e75128
     PARALLEL_DIRS += ['wave']
e75128
 
e75128
diff -up mozilla-aurora/layout/media/symbols.def.in.remove-ogg mozilla-aurora/layout/media/symbols.def.in
e75128
--- mozilla-aurora/layout/media/symbols.def.in.remove-ogg	2014-05-06 13:17:13.000000000 +0200
e75128
+++ mozilla-aurora/layout/media/symbols.def.in	2014-06-03 13:51:14.454340486 +0200
e75128
@@ -145,6 +145,7 @@ cubeb_stream_init
e75128
 cubeb_stream_start
e75128
 cubeb_stream_stop
e75128
 cubeb_stream_get_latency
e75128
+#ifdef MOZ_OGG
e75128
 th_comment_clear
e75128
 th_comment_init
e75128
 th_decode_alloc
e75128
@@ -158,6 +159,7 @@ th_info_init
e75128
 th_packet_isheader
e75128
 th_packet_iskeyframe
e75128
 th_setup_free
e75128
+#endif
e75128
 #ifdef MOZ_OPUS
e75128
 opus_decoder_create
e75128
 opus_decoder_destroy
e75128
diff -up mozilla-aurora/modules/libpref/src/init/all.js.remove-ogg mozilla-aurora/modules/libpref/src/init/all.js
e75128
--- mozilla-aurora/modules/libpref/src/init/all.js.remove-ogg	2014-05-19 11:43:49.000000000 +0200
e75128
+++ mozilla-aurora/modules/libpref/src/init/all.js	2014-06-03 13:51:25.028355239 +0200
e75128
@@ -212,7 +212,9 @@ pref("media.fragmented-mp4.use-blank-dec
e75128
 #ifdef MOZ_RAW
e75128
 pref("media.raw.enabled", true);
e75128
 #endif
e75128
+#ifdef MOZ_OGG
e75128
 pref("media.ogg.enabled", true);
e75128
+#endif
e75128
 #ifdef MOZ_OPUS
e75128
 pref("media.opus.enabled", true);
e75128
 #endif
e75128
diff -up mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py.remove-ogg mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py
e75128
--- mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py.remove-ogg	2014-05-06 13:17:17.000000000 +0200
e75128
+++ mozilla-aurora/python/mozbuild/mozbuild/mozinfo.py	2014-06-03 13:51:25.028355239 +0200
e75128
@@ -84,6 +84,7 @@ def build_dict(config, env=os.environ):
e75128
     d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
e75128
     d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
e75128
 
e75128
+    d['ogg'] = bool(substs.get('MOZ_OGG'))
e75128
     d['webm'] = bool(substs.get('MOZ_WEBM'))
e75128
     d['wave'] = bool(substs.get('MOZ_WAVE'))
e75128
 
e75128
diff -up mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp.remove-ogg mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp
e75128
--- mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp.remove-ogg	2014-05-06 13:17:27.000000000 +0200
e75128
+++ mozilla-aurora/uriloader/exthandler/nsExternalHelperAppService.cpp	2014-06-03 13:51:25.030355242 +0200
e75128
@@ -462,6 +462,7 @@ static nsDefaultMimeTypeEntry defaultMim
e75128
   { "application/xhtml+xml", "xhtml" },
e75128
   { "application/xhtml+xml", "xht" },
e75128
   { TEXT_PLAIN, "txt" },
e75128
+#ifdef MOZ_OGG
e75128
   { VIDEO_OGG, "ogv" },
e75128
   { VIDEO_OGG, "ogg" },
e75128
   { APPLICATION_OGG, "ogg" },
e75128
@@ -469,6 +470,7 @@ static nsDefaultMimeTypeEntry defaultMim
e75128
 #ifdef MOZ_OPUS
e75128
   { AUDIO_OGG, "opus" },
e75128
 #endif
e75128
+#endif
e75128
 #ifdef MOZ_WEBM
e75128
   { VIDEO_WEBM, "webm" },
e75128
   { AUDIO_WEBM, "webm" },
e75128
diff -up mozilla-aurora/xpcom/build/nsXPComInit.cpp.remove-ogg mozilla-aurora/xpcom/build/nsXPComInit.cpp
e75128
--- mozilla-aurora/xpcom/build/nsXPComInit.cpp.remove-ogg	2014-06-03 14:04:38.913464144 +0200
e75128
+++ mozilla-aurora/xpcom/build/nsXPComInit.cpp	2014-06-03 14:06:03.282582245 +0200
e75128
@@ -133,7 +133,9 @@ extern nsresult nsStringInputStreamConst
e75128
 #include "mozilla/VisualEventTracer.h"
e75128
 #endif
e75128
 
e75128
+#if MOZ_OGG
e75128
 #include "ogg/ogg.h"
e75128
+#endif
e75128
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
e75128
 #include "vpx_mem/vpx_mem.h"
e75128
 #endif
e75128
@@ -378,7 +380,7 @@ private:
e75128
 NS_IMPL_ISUPPORTS(ICUReporter, nsIMemoryReporter)
e75128
 
e75128
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<ICUReporter>::sAmount(0);
e75128
-
e75128
+#if MOZ_OGG
e75128
 class OggReporter MOZ_FINAL : public nsIMemoryReporter,
e75128
                               public CountingAllocatorBase<OggReporter>
e75128
 {
e75128
@@ -420,7 +422,7 @@ NS_IMPL_ISUPPORTS(VPXReporter, nsIMemory
e75128
 
e75128
 /* static */ template<> Atomic<size_t> CountingAllocatorBase<VPXReporter>::sAmount(0);
e75128
 #endif /* MOZ_VPX */
e75128
-
e75128
+#endif /* MOZ_OGG */
e75128
 #ifdef MOZ_WEBM
e75128
 class NesteggReporter MOZ_FINAL : public nsIMemoryReporter
e75128
                                 , public CountingAllocatorBase<NesteggReporter>
e75128
@@ -606,12 +608,13 @@ NS_InitXPCOM2(nsIServiceManager* *result
e75128
     // depend on the XPCOM-based memory reporting goop.  So for now, we have
e75128
     // this oddness.
e75128
     mozilla::SetICUMemoryFunctions();
e75128
-
e75128
+#if MOZ_OGG
e75128
     // Do the same for libogg.
e75128
     ogg_set_mem_functions(OggReporter::CountingMalloc,
e75128
                           OggReporter::CountingCalloc,
e75128
                           OggReporter::CountingRealloc,
e75128
                           OggReporter::CountingFree);
e75128
+#endif
e75128
 
e75128
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
e75128
     // And for VPX.
e75128
@@ -678,7 +681,9 @@ NS_InitXPCOM2(nsIServiceManager* *result
e75128
 
e75128
     // The memory reporter manager is up and running -- register our reporters.
e75128
     RegisterStrongMemoryReporter(new ICUReporter());
e75128
+#if MOZ_OGG
e75128
     RegisterStrongMemoryReporter(new OggReporter());
e75128
+#endif
e75128
 #ifdef MOZ_VPX
e75128
     RegisterStrongMemoryReporter(new VPXReporter());
e75128
 #endif