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