diff options
author | Christoph Gysin | 2016-05-03 19:27:12 +0300 |
---|---|---|
committer | Christoph Gysin | 2016-05-03 19:27:29 +0300 |
commit | a9f3bd2a5afd3227733414a5d54c7a2aa0a1249e (patch) | |
tree | 5ba4581e4550744ba87a7d7a7ac4bf707aa13203 | |
parent | ee2e3dedc6dd1eddc22b76a414297a6527086465 (diff) | |
download | aur-a9f3bd2a5afd3227733414a5d54c7a2aa0a1249e.tar.gz |
backport fix for ffmpeg-3.0
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-update-for-ffmpeg-3.0.patch | 77 | ||||
-rw-r--r-- | PKGBUILD | 14 |
3 files changed, 91 insertions, 6 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Feb 18 20:43:18 UTC 2016 +# Tue May 3 16:27:27 UTC 2016 pkgbase = libgroove pkgdesc = Library that provides decoding and encoding of audio on a playlist. pkgver = 4.3.0 - pkgrel = 1 + pkgrel = 3 url = https://github.com/andrewrk/libgroove arch = i686 arch = x86_64 @@ -15,7 +15,9 @@ pkgbase = libgroove depends = libebur128 options = strip source = https://github.com/andrewrk/libgroove/archive/4.3.0.tar.gz + source = 0001-update-for-ffmpeg-3.0.patch sha256sums = 76f68896f078a9613d420339ef887ca8293884ad2cd0fbc031d89a6af2993636 + sha256sums = 444daed8d4a1180eb8ce303470c87c15bd6c28ff90cf145c5db815639c47be08 pkgname = libgroove diff --git a/0001-update-for-ffmpeg-3.0.patch b/0001-update-for-ffmpeg-3.0.patch new file mode 100644 index 000000000000..b46aacd4ce8f --- /dev/null +++ b/0001-update-for-ffmpeg-3.0.patch @@ -0,0 +1,77 @@ +diff --git a/README.md b/README.md +index b93ec71..fbd3ce2 100644 +--- a/README.md ++++ b/README.md +@@ -50,8 +50,8 @@ Dependencies + + You will need these to compile libgroove. + +-* [cmake](http://www.cmake.org/) +-* [libav](http://libav.org) ++* [cmake](http://www.cmake.org/) >= 2.8.5 ++* [libav](http://libav.org) >= 3.0 + * suggested flags: `--enable-shared --disable-static --enable-libmp3lame --enable-libvorbis --enable-gpl` + * [libebur128](https://github.com/jiixyj/libebur128) + * make sure it is compiled with the speex dependency so that true peak +diff --git a/groove/encoder.c b/groove/encoder.c +index 42a55bd..d9f25ca 100644 +--- a/groove/encoder.c ++++ b/groove/encoder.c +@@ -91,7 +91,7 @@ static int encode_buffer(struct GrooveEncoder *encoder, struct GrooveBuffer *buf + return -1; + + av_write_frame(e->fmt_ctx, &e->pkt); +- av_free_packet(&e->pkt); ++ av_packet_unref(&e->pkt); + + return 0; + } +diff --git a/groove/file.c b/groove/file.c +index bc3c6ad..fe54c48 100644 +--- a/groove/file.c ++++ b/groove/file.c +@@ -111,7 +111,7 @@ void groove_file_close(struct GrooveFile *file) { + if (f->audio_stream_index >= 0) { + AVCodecContext *avctx = f->ic->streams[f->audio_stream_index]->codec; + +- av_free_packet(&f->audio_pkt); ++ av_packet_unref(&f->audio_pkt); + + f->ic->streams[f->audio_stream_index]->discard = AVDISCARD_ALL; + avcodec_close(avctx); +@@ -199,7 +199,7 @@ static int tempfileify(char * str, size_t max_len) { + static void cleanup_save(struct GrooveFile *file) { + struct GrooveFilePrivate *f = (struct GrooveFilePrivate *) file; + +- av_free_packet(&f->audio_pkt); ++ av_packet_unref(&f->audio_pkt); + avio_closep(&f->oc->pb); + if (f->tempfile_exists) { + if (remove(f->oc->filename) != 0) +@@ -355,7 +355,7 @@ int groove_file_save(struct GrooveFile *file) { + av_log(NULL, AV_LOG_ERROR, "error writing frame\n"); + return -1; + } +- av_free_packet(pkt); ++ av_packet_unref(pkt); + } + + if (av_write_trailer(f->oc) < 0) { +diff --git a/groove/playlist.c b/groove/playlist.c +index 0230d03..709f8cf 100644 +--- a/groove/playlist.c ++++ b/groove/playlist.c +@@ -595,11 +595,11 @@ static int decode_one_frame(struct GroovePlaylist *playlist, struct GrooveFile * + } + if (pkt->stream_index != f->audio_stream_index) { + // we're only interested in the One True Audio Stream +- av_free_packet(pkt); ++ av_packet_unref(pkt); + return 0; + } + audio_decode_frame(playlist, file); +- av_free_packet(pkt); ++ av_packet_unref(pkt); + return 0; + } + @@ -3,7 +3,7 @@ pkgname=libgroove pkgver=4.3.0 -pkgrel=2 +pkgrel=3 pkgdesc='Library that provides decoding and encoding of audio on a playlist.' arch=(i686 x86_64) url='https://github.com/andrewrk/libgroove' @@ -11,15 +11,21 @@ license=(MIT) depends=(sdl2 chromaprint libebur128) makedepends=(cmake yasm) options=('strip') -source=("https://github.com/andrewrk/libgroove/archive/${pkgver}.tar.gz") -sha256sums=('76f68896f078a9613d420339ef887ca8293884ad2cd0fbc031d89a6af2993636') +source=("https://github.com/andrewrk/libgroove/archive/${pkgver}.tar.gz" + "0001-update-for-ffmpeg-3.0.patch") +sha256sums=('76f68896f078a9613d420339ef887ca8293884ad2cd0fbc031d89a6af2993636' + '444daed8d4a1180eb8ce303470c87c15bd6c28ff90cf145c5db815639c47be08') + prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -fNp1 -i ../0001-update-for-ffmpeg-3.0.patch + sed \ -e 's|^libdir=$|libdir=/usr/lib|' \ -e 's|^includedir=$|includedir=/usr/include/groove|' \ -e "s|^Version:$|Version: ${pkgver}|" \ - "${srcdir}/${pkgname}-${pkgver}/example/libgroove.pc" \ + example/libgroove.pc \ > "${srcdir}/libgroove.pc" } |