From c7e1c43ab6ccfcab1d3d91ab58cc79dd43de6ceb Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sun, 26 Mar 2017 11:15:12 -0400 Subject: [PATCH] fix mp3 enablement --- chromium-57.0.2987.110-enable-mp3.patch | 27 +++++++++++++++++++++++++ chromium.spec | 13 +++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/chromium-57.0.2987.110-enable-mp3.patch b/chromium-57.0.2987.110-enable-mp3.patch index 676ade1e..a8b9ee67 100644 --- a/chromium-57.0.2987.110-enable-mp3.patch +++ b/chromium-57.0.2987.110-enable-mp3.patch @@ -99,3 +99,30 @@ diff -up chromium-57.0.2987.110/third_party/ffmpeg/libavcodec/sbrdsp.c.mp3 chrom #include "config.h" #include "libavutil/attributes.h" #include "libavutil/intfloat.h" +diff -up chromium-57.0.2987.110/media/base/mime_util_internal.cc.mp3 chromium-57.0.2987.110/media/base/mime_util_internal.cc +--- chromium-57.0.2987.110/media/base/mime_util_internal.cc.mp3 2017-03-26 11:11:41.480377812 -0400 ++++ chromium-57.0.2987.110/media/base/mime_util_internal.cc 2017-03-26 11:13:19.289810708 -0400 +@@ -291,10 +291,10 @@ void MimeUtil::AddSupportedMediaFormats( + CodecSet webm_codecs(webm_audio_codecs); + webm_codecs.insert(webm_video_codecs.begin(), webm_video_codecs.end()); + +-#if defined(USE_PROPRIETARY_CODECS) + CodecSet mp3_codecs; + mp3_codecs.insert(MP3); + ++#if defined(USE_PROPRIETARY_CODECS) + CodecSet aac; + aac.insert(MPEG2_AAC); + aac.insert(MPEG4_AAC); +@@ -335,10 +335,10 @@ void MimeUtil::AddSupportedMediaFormats( + AddContainerWithCodecs("application/ogg", ogg_codecs, false); + AddContainerWithCodecs("audio/flac", implicit_codec, false); + +-#if defined(USE_PROPRIETARY_CODECS) + AddContainerWithCodecs("audio/mpeg", mp3_codecs, true); // Allow "mp3". + AddContainerWithCodecs("audio/mp3", implicit_codec, true); + AddContainerWithCodecs("audio/x-mp3", implicit_codec, true); ++#if defined(USE_PROPRIETARY_CODECS) + AddContainerWithCodecs("audio/aac", implicit_codec, true); // AAC / ADTS. + AddContainerWithCodecs("audio/mp4", mp4_audio_codecs, true); + DCHECK(!mp4_video_codecs.empty()); diff --git a/chromium.spec b/chromium.spec index 210c28cc..fd7718ee 100644 --- a/chromium.spec +++ b/chromium.spec @@ -97,7 +97,7 @@ BuildRequires: libicu-devel >= 5.4 Name: chromium%{chromium_channel} Version: %{majorversion}.0.2987.110 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A WebKit (Blink) powered web browser Url: http://www.chromium.org/Home License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) @@ -539,7 +539,14 @@ members of the Chromium and WebDriver teams. %patch31 -p1 -b .permissive %patch32 -p1 -b .unique-ptr-fix %patch33 -p1 -b .gcc7 +# RHEL 7 compiler is too old +# does not have stdatomic.h +# In file included from ../../third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c:2:0: +# ../../third_party/ffmpeg/libavutil/cpu.c:24:23: fatal error: stdatomic.h: No such file or directory +# #include +%if 0%{?fedora} %patch34 -p1 -b .mp3 +%endif ### Chromium Tests Patches ### %patch100 -p1 -b .use_system_opus @@ -1575,6 +1582,10 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %{chromium_path}/chromedriver %changelog +* Sun Mar 26 2017 Tom Callaway 57.0.2987.110-3 +- fix mp3 enablement +- disable mp3 enablement on RHEL (compiler too old) + * Tue Mar 21 2017 Tom Callaway 57.0.2987.110-2 - fix privlibs