diff --git a/xmms2-0.8DrO_o-ffmpeg-2.2.patch b/xmms2-0.8DrO_o-ffmpeg-2.2.patch new file mode 100644 index 0000000..0fe0ec2 --- /dev/null +++ b/xmms2-0.8DrO_o-ffmpeg-2.2.patch @@ -0,0 +1,72 @@ +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 +@@ -27,6 +27,7 @@ + #include "avcodec_compat.h" + + #define AVCODEC_BUFFER_SIZE 16384 ++#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio + + typedef struct { + AVCodecContext *codecctx; +@@ -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 { +@@ -263,7 +264,7 @@ xmms_avcodec_read (xmms_xform_t *xform, + xmms_error_t *error) + { + xmms_avcodec_data_t *data; +- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE]; ++ char outbuf[MAX_AUDIO_FRAME_SIZE]; + gint outbufsize, bytes_read = 0; + guint size; + +@@ -371,7 +372,7 @@ static gint64 + xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t whence, xmms_error_t *err) + { + xmms_avcodec_data_t *data; +- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE]; ++ char outbuf[MAX_AUDIO_FRAME_SIZE]; + gint outbufsize, bytes_read = 0; + gint64 ret = -1; + +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 diff --git a/xmms2.spec b/xmms2.spec index c3bda06..a3851b2 100644 --- a/xmms2.spec +++ b/xmms2.spec @@ -6,7 +6,7 @@ Name: xmms2 Version: 0.8DrO_o Epoch: 1 -Release: 3mamba +Release: 4mamba Summary: A multimedia player that has most of the features as WinAmp Group: Graphical Desktop/Applications/Multimedia Vendor: openmamba @@ -17,6 +17,7 @@ Source0: http://downloads.sourceforge.net/project/xmms2/xmms2/%{majver}%20 Source1: xmms2-desktopfile Patch0: xmms2-0.8DrO_o-cython-1.9.patch Patch1: xmms2-0.8DrO_o-libavcodec-ffmpeg-1.2.1.patch +Patch2: xmms2-0.8DrO_o-ffmpeg-2.2.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -44,7 +45,7 @@ BuildRequires: libjack-devel BuildRequires: libmad-devel BuildRequires: libmms-devel BuildRequires: libmodplug-devel -BuildRequires: libmpcdec-devel +BuildRequires: libmusepack-devel BuildRequires: libofa-devel BuildRequires: libogg-devel BuildRequires: libopenssl-devel @@ -74,7 +75,6 @@ BuildRequires: ruby-devel BuildRequires: autoconf-archive %if "%{stage1}" != "1" BuildRequires: avahi-compat-libdns_sd-devel -BuildRequires: PyKDE4-devel %ifarch %{ix86} BuildRequires: cross-mingw32-toolchain %endif @@ -133,6 +133,7 @@ Development libraries and headers for XMMS2. You probably need this to develop o %setup -q -n %{name}-%{majver}%{minver} %patch0 -p1 %patch1 -p1 +%patch2 -p1 # This header doesn't need to be executable chmod -x src/include/xmmsclient/xmmsclient++/dict.h @@ -284,6 +285,9 @@ install -D -m644 %{S:1} \ %{perl_archlib}/auto/Audio/ %changelog +* Thu May 15 2014 Silvan Calarco 0.8DrO_o-4mamba +- ffmpeg 2.2 rebuild + * Sat Sep 14 2013 Silvan Calarco 0.8DrO_o-3mamba - add epoch to internal requires