Author: oget
Update of /cvs/free/rpms/xmms2-freeworld/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv5578
Modified Files:
xmms2-freeworld.spec
Added Files:
xmms2-ffmpeg.patch
Log Message:
* Thu Nov 01 2012 John Doe <anonymous(a)american.us> 0.8-5
- Patch for new ffmpeg
xmms2-ffmpeg.patch:
avcodec.c | 4 ++--
avcodec_compat.h | 18 ++++++++++++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
Index: xmms2-ffmpeg.patch
===================================================================
RCS file: xmms2-ffmpeg.patch
diff -N xmms2-ffmpeg.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ xmms2-ffmpeg.patch 2 Nov 2012 01:50:27 -0000 1.3
@@ -0,0 +1,46 @@
+diff -rupN xmms2-0.8DrO_o.old/src/plugins/avcodec/avcodec.c
xmms2-0.8DrO_o/src/plugins/avcodec/avcodec.c
+--- xmms2-0.8DrO_o.old/src/plugins/avcodec/avcodec.c 2011-10-20 15:26:08.000000000 -0400
++++ xmms2-0.8DrO_o/src/plugins/avcodec/avcodec.c 2012-11-01 21:36:57.426070895 -0400
+@@ -200,7 +200,7 @@ xmms_avcodec_init (xmms_xform_t *xform)
+ }
+ }
+
+- data->codecctx = avcodec_alloc_context ();
++ data->codecctx = avcodec_alloc_context3 (codec);
+ data->codecctx->sample_rate = data->samplerate;
+ data->codecctx->channels = data->channels;
+ data->codecctx->bit_rate = data->bitrate;
+@@ -211,7 +211,7 @@ xmms_avcodec_init (xmms_xform_t *xform)
+ data->codecctx->codec_id = codec->id;
+ data->codecctx->codec_type = codec->type;
+
+- if (avcodec_open (data->codecctx, codec) < 0) {
++ if (avcodec_open2 (data->codecctx, codec, NULL) < 0) {
+ XMMS_DBG ("Opening decoder '%s' failed", codec->name);
+ goto err;
+ } else {
+diff -rupN xmms2-0.8DrO_o.old/src/plugins/avcodec/avcodec_compat.h
xmms2-0.8DrO_o/src/plugins/avcodec/avcodec_compat.h
+--- xmms2-0.8DrO_o.old/src/plugins/avcodec/avcodec_compat.h 2011-10-20 15:26:08.000000000
-0400
++++ xmms2-0.8DrO_o/src/plugins/avcodec/avcodec_compat.h 2012-11-01 21:35:50.276405569
-0400
+@@ -65,3 +65,21 @@ typedef struct AVPacket {
+ # define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO
+ #endif
+
++/* Calling avcodec_init is not necessary after 53.04 (ffmpeg 0.9) */
++#if LIBAVCODEC_VERSION_INT >= 0x350400
++# define avcodec_init()
++#endif
++
++/* Map avcodec_alloc_context3 into the deprecated version
++ * avcodec_alloc_context in versions earlier than 53.04 (ffmpeg 0.9) */
++#if LIBAVCODEC_VERSION_INT < 0x350400
++# define avcodec_alloc_context3(codec) \
++ avcodec_alloc_context()
++#endif
++
++/* Map avcodec_open2 into the deprecated version
++ * avcodec_open in versions earlier than 53.04 (ffmpeg 0.9) */
++#if LIBAVCODEC_VERSION_INT < 0x350400
++# define avcodec_open2(avctx, codec, options) \
++ avcodec_open(avctx, codec)
++#endif
Index: xmms2-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/xmms2-freeworld/devel/xmms2-freeworld.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- xmms2-freeworld.spec 1 Nov 2012 19:17:49 -0000 1.10
+++ xmms2-freeworld.spec 2 Nov 2012 01:50:27 -0000 1.11
@@ -3,7 +3,7 @@
Name: xmms2-freeworld
Summary: Plugins for XMMS2 that cannot be included in Fedora
Version: 0.8
-Release: 4%{?dist}
+Release: 5%{?dist}
License: LGPLv2+ and GPL+ and BSD
Group: Applications/Multimedia
# Fedora's xmms2 has to use a sanitized tarball, we don't.
@@ -12,6 +12,8 @@
Patch0: xmms2-0.8DrO_o-use-libdir.patch
# Don't add extra CFLAGS, we're smart enough, thanks.
Patch1: xmms2-0.8DrO_o-no-O0.patch
+# Fix compilation against newer ffmpeg
+Patch2: xmms2-ffmpeg.patch
URL:
http://wiki.xmms2.xmms.se/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -93,6 +95,7 @@
%patch0 -p1 -b .plugins-use-libdir
%patch1 -p1 -b .noO0
+%patch2 -p1 -b .oldffmpeg
%build
@@ -205,6 +208,9 @@
%{_libdir}/xmms2/libxmms_mp4.so
%changelog
+* Thu Nov 01 2012 John Doe <anonymous(a)american.us> 0.8-5
+- Patch for new ffmpeg
+
* Thu Nov 01 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 0.8-4
- Rebuilt for ffmpeg