From afde5d55b9f5a66508308db0eb68918d2a758579 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Sun, 10 Jan 2016 18:59:30 -0800 Subject: [PATCH] debian: Update to 0.8.2-4 --- dist/debian/changelog | 6 +++++ dist/debian/control | 2 +- dist/debian/patches/ffmpeg_2.9.patch | 34 ++++++++++++++++++++++++++++ dist/debian/patches/series | 1 + 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100755 dist/debian/patches/ffmpeg_2.9.patch diff --git a/dist/debian/changelog b/dist/debian/changelog index 83ef991..b32c39c 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,3 +1,9 @@ +spek (0.8.2-4) unstable; urgency=low + + * Fix build with FFmpeg 2.9 (Closes: #803861) + + -- Alexander Kojevnikov Sun, 10 Jan 2016 17:52:24 -0800 + spek (0.8.2-3.2) unstable; urgency=medium * Build using the default GCC. Closes: #751331. diff --git a/dist/debian/control b/dist/debian/control index 97d51c0..411c526 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9), libavutil-dev (>= 6:0.8), libwxgtk3.0-dev, wx-common -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: http://spek.cc/ Vcs-Git: git://github.com/alexkay/spek.git Vcs-Browser: https://github.com/alexkay/spek diff --git a/dist/debian/patches/ffmpeg_2.9.patch b/dist/debian/patches/ffmpeg_2.9.patch new file mode 100755 index 0000000..e5c493a --- /dev/null +++ b/dist/debian/patches/ffmpeg_2.9.patch @@ -0,0 +1,34 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun +Last-Update: <2015-11-02> + +--- spek-0.8.2.orig/src/spek-audio.cc ++++ spek-0.8.2/src/spek-audio.cc +@@ -199,7 +199,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; +@@ -215,7 +215,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 +@@ -255,7 +255,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/dist/debian/patches/series b/dist/debian/patches/series index 8215fd9..a1e29d9 100644 --- a/dist/debian/patches/series +++ b/dist/debian/patches/series @@ -1,2 +1,3 @@ fix-compilation-with-libav-8.patch +ffmpeg_2.9.patch