[gstreamer-plugins-bad-free] Patch from the upstream to fix build with newer celt (bug 681150, GNOME bug 643607)
Mamoru Tasaka
mtasaka at fedoraproject.org
Thu Mar 3 12:15:11 UTC 2011
commit c89363baea43f536e23faccf019668b541b78724
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Thu Mar 3 21:14:58 2011 +0900
Patch from the upstream to fix build with newer celt
(bug 681150, GNOME bug 643607)
gst-plugins-bad-fix-compilation-with-celt.patch | 84 +++++++++++++++++++++++
gstreamer-plugins-bad-free.spec | 16 ++++-
2 files changed, 99 insertions(+), 1 deletions(-)
---
diff --git a/gst-plugins-bad-fix-compilation-with-celt.patch b/gst-plugins-bad-fix-compilation-with-celt.patch
new file mode 100644
index 0000000..0bc7b62
--- /dev/null
+++ b/gst-plugins-bad-fix-compilation-with-celt.patch
@@ -0,0 +1,84 @@
+From 1eb3f7f41fdbef005a62b3f03fdfd373f93c83ed Mon Sep 17 00:00:00 2001
+From: Sebastian Dröge <sebastian.droege at collabora.co.uk>
+Date: Wed, 02 Mar 2011 22:43:42 +0000
+Subject: celtenc: Fix compilation with celt >= 0.11.0
+
+Fixes bug #643607.
+---
+diff --git a/configure.ac b/configure.ac
+index a2a38bc..374c7aa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -639,6 +639,13 @@ AG_GST_CHECK_FEATURE(CELT, [celt], celt, [
+ dnl to prevent an error
+ true
+ ])
++
++ PKG_CHECK_MODULES(CELT_0_11, celt >= 0.11.0, [
++ AC_DEFINE([HAVE_CELT_0_11], 1, [Define if libcelt 0.11 is installed])
++ ], [
++ dnl to prevent an error
++ true
++ ])
+ AC_SUBST(CELT_CFLAGS)
+ AC_SUBST(CELT_LIBS)
+ ])
+diff --git a/ext/celt/gstceltdec.c b/ext/celt/gstceltdec.c
+index 1b3f4eb..66c829e 100644
+--- a/ext/celt/gstceltdec.c
++++ b/ext/celt/gstceltdec.c
+@@ -510,11 +510,16 @@ celt_dec_chain_parse_header (GstCeltDec * dec, GstBuffer * buf)
+ goto mode_init_failed;
+
+ /* initialize the decoder */
++#ifdef HAVE_CELT_0_11
++ dec->state =
++ celt_decoder_create_custom (dec->mode, dec->header.nb_channels, &error);
++#else
+ #ifdef HAVE_CELT_0_7
+ dec->state = celt_decoder_create (dec->mode, dec->header.nb_channels, &error);
+ #else
+ dec->state = celt_decoder_create (dec->mode);
+ #endif
++#endif
+ if (!dec->state)
+ goto init_failed;
+
+diff --git a/ext/celt/gstceltenc.c b/ext/celt/gstceltenc.c
+index 4fd9ee8..7481579 100644
+--- a/ext/celt/gstceltenc.c
++++ b/ext/celt/gstceltenc.c
+@@ -629,11 +629,15 @@ gst_celt_enc_setup (GstCeltEnc * enc)
+ if (!enc->mode)
+ goto mode_initialization_failed;
+
++#ifdef HAVE_CELT_0_11
++ celt_header_init (&enc->header, enc->mode, enc->frame_size, enc->channels);
++#else
+ #ifdef HAVE_CELT_0_7
+ celt_header_init (&enc->header, enc->mode, enc->channels);
+ #else
+ celt_header_init (&enc->header, enc->mode);
+ #endif
++#endif
+ enc->header.nb_channels = enc->channels;
+
+ #ifdef HAVE_CELT_0_8
+@@ -642,11 +646,15 @@ gst_celt_enc_setup (GstCeltEnc * enc)
+ celt_mode_info (enc->mode, CELT_GET_FRAME_SIZE, &enc->frame_size);
+ #endif
+
++#ifdef HAVE_CELT_0_11
++ enc->state = celt_encoder_create_custom (enc->mode, enc->channels, &error);
++#else
+ #ifdef HAVE_CELT_0_7
+ enc->state = celt_encoder_create (enc->mode, enc->channels, &error);
+ #else
+ enc->state = celt_encoder_create (enc->mode);
+ #endif
++#endif
+ if (!enc->state)
+ goto encoder_creation_failed;
+
+--
+cgit v0.8.3-6-g21f6
diff --git a/gstreamer-plugins-bad-free.spec b/gstreamer-plugins-bad-free.spec
index 7602661..be1ad1a 100644
--- a/gstreamer-plugins-bad-free.spec
+++ b/gstreamer-plugins-bad-free.spec
@@ -7,7 +7,7 @@
Summary: GStreamer streaming media framework "bad" plug-ins
Name: gstreamer-plugins-bad-free
Version: 0.10.21
-Release: 3%{?dist}
+Release: 4%{?dist}
# The freeze and nfs plugins are LGPLv2 (only)
License: LGPLv2+ and LGPLv2
Group: Applications/Multimedia
@@ -17,6 +17,9 @@ URL: http://gstreamer.freedesktop.org/
# modified with gst-p-bad-cleanup.sh from SOURCE1
Source: gst-plugins-bad-free-%{version}.tar.bz2
Source1: gst-p-bad-cleanup.sh
+# Fix build with celt 0.11.1 (RH bug 681150, GNOME bug 643607)
+# Patch from the upstream git tree, commit 1eb3f7f41fdbef005a62b3f03fdfd373f93c83ed
+Patch0: gst-plugins-bad-fix-compilation-with-celt.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{gstreamer} >= %{gst_minver}
@@ -29,6 +32,10 @@ BuildRequires: PyXML
BuildRequires: libXt-devel
BuildRequires: gtk-doc
+# For Patch0
+BuildRequires: automake
+BuildRequires: libtool
+
BuildRequires: bzip2-devel
BuildRequires: celt-devel
BuildRequires: dirac-devel
@@ -134,6 +141,9 @@ aren't tested well enough, or the code is not of good enough quality.
%prep
%setup -q -n gst-plugins-bad-%{version}
+%patch0 -p1 -b .celt
+env NOCONFIGURE=1 sh autogen.sh
+
%build
%configure \
--with-package-name="Fedora gstreamer-plugins-bad package" \
@@ -297,6 +307,10 @@ aren't tested well enough, or the code is not of good enough quality.
%doc %{_datadir}/gtk-doc/html/gst-plugins-bad-plugins-%{majorminor}
%changelog
+* Thu Mar 03 2011 Mamoru Tasaka <mtasaka at fedorapeoject.org> - 0.10.21-4
+- Patch from the upstream to fix build with newer celt
+ (bug 681150, GNOME bug 643607)
+
* Wed Feb 16 2011 Peter Robinson <pbrobinson at gmail.com> - 0.10.21-3
- Rebuilt for new celt
More information about the scm-commits
mailing list