summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-12-05 12:01:55 +0100
committerAlexis Ballier <aballier@gentoo.org>2016-12-05 12:02:06 +0100
commit80ba3a79d1639271ad0d3931e59c19bb2836abba (patch)
treed490893ca0901f9191e7770109ba5f3e67b42d1f /media-sound/spek
parentsys-apps/portage: Version bump (diff)
downloadgentoo-80ba3a79d1639271ad0d3931e59c19bb2836abba.tar.gz
gentoo-80ba3a79d1639271ad0d3931e59c19bb2836abba.tar.bz2
gentoo-80ba3a79d1639271ad0d3931e59c19bb2836abba.zip
media-sound/spek: backport upstream patches to build with ffmpeg3; bug #575060
Package-Manager: portage-2.3.2
Diffstat (limited to 'media-sound/spek')
-rw-r--r--media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch33
-rw-r--r--media-sound/spek/files/spek-0.8.3-ffmpeg3.patch37
-rw-r--r--media-sound/spek/spek-0.8.3-r1.ebuild6
3 files changed, 74 insertions, 2 deletions
diff --git a/media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch b/media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch
new file mode 100644
index 000000000000..dee0e3ca0f8f
--- /dev/null
+++ b/media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch
@@ -0,0 +1,33 @@
+https://github.com/alexkay/spek/commit/ee8bc49ed4a93a14a933ecb0eebfe424111f8413
+
+Index: spek-0.8.3/src/spek-audio.cc
+===================================================================
+--- spek-0.8.3.orig/src/spek-audio.cc
++++ spek-0.8.3/src/spek-audio.cc
+@@ -202,7 +202,7 @@ AudioFileImpl::AudioFileImpl(
+ this->packet.data = nullptr;
+ this->packet.size = 0;
+ this->offset = 0;
+- this->frame = avcodec_alloc_frame();
++ this->frame = av_frame_alloc();
+ this->buffer_size = 0;
+ this->buffer = nullptr;
+ this->frames_per_interval = 0;
+@@ -218,7 +218,7 @@ AudioFileImpl::~AudioFileImpl()
+ if (this->frame) {
+ // TODO: Remove this check after Debian switches to libav 9.
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
+- avcodec_free_frame(&this->frame);
++ av_frame_free(&this->frame);
+ #else
+ av_freep(&this->frame);
+ #endif
+@@ -258,7 +258,7 @@ int AudioFileImpl::read()
+
+ for (;;) {
+ while (this->packet.size > 0) {
+- avcodec_get_frame_defaults(this->frame);
++ av_frame_unref(this->frame);
+ auto codec_context = this->format_context->streams[this->audio_stream]->codec;
+ int got_frame = 0;
+ int len = avcodec_decode_audio4(codec_context, this->frame, &got_frame, &this->packet);
diff --git a/media-sound/spek/files/spek-0.8.3-ffmpeg3.patch b/media-sound/spek/files/spek-0.8.3-ffmpeg3.patch
new file mode 100644
index 000000000000..ad82a38c31c5
--- /dev/null
+++ b/media-sound/spek/files/spek-0.8.3-ffmpeg3.patch
@@ -0,0 +1,37 @@
+commit 1ef950dcbf89dd8adf816009b54009f487828a45
+Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
+Date: Sun Mar 27 14:19:42 2016 -0700
+
+ Replace deprecated FFmpeg API
+
+diff --git a/src/spek-audio.cc b/src/spek-audio.cc
+index b7633bc..21ea7a4 100644
+--- a/src/spek-audio.cc
++++ b/src/spek-audio.cc
+@@ -222,7 +222,7 @@ AudioFileImpl::~AudioFileImpl()
+ this->packet.data -= this->offset;
+ this->packet.size += this->offset;
+ this->offset = 0;
+- av_free_packet(&this->packet);
++ av_packet_unref(&this->packet);
+ }
+ if (this->format_context) {
+ if (this->audio_stream >= 0) {
+@@ -326,7 +326,7 @@ int AudioFileImpl::read()
+ this->packet.data -= this->offset;
+ this->packet.size += this->offset;
+ this->offset = 0;
+- av_free_packet(&this->packet);
++ av_packet_unref(&this->packet);
+ }
+
+ int res = 0;
+@@ -334,7 +334,7 @@ int AudioFileImpl::read()
+ if (this->packet.stream_index == this->audio_stream) {
+ break;
+ }
+- av_free_packet(&this->packet);
++ av_packet_unref(&this->packet);
+ }
+ if (res < 0) {
+ // End of file or error.
diff --git a/media-sound/spek/spek-0.8.3-r1.ebuild b/media-sound/spek/spek-0.8.3-r1.ebuild
index 8a9099526c7f..4becb5f06c86 100644
--- a/media-sound/spek/spek-0.8.3-r1.ebuild
+++ b/media-sound/spek/spek-0.8.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -41,6 +41,8 @@ src_prepare() {
epatch \
"${FILESDIR}"/${PN}-0.8.1-disable-updates.patch \
"${FILESDIR}"/${P}-replace-gnu+11-with-c++11.patch \
- "${FILESDIR}"/${P}-stdlib.patch
+ "${FILESDIR}"/${P}-stdlib.patch \
+ "${FILESDIR}"/${P}-ffmpeg3.patch \
+ "${FILESDIR}"/${P}-ffmpeg3-1.patch
eautoreconf
}