Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/spek spek: Switch to ffmpeg4. Patch from FreeBSD...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2ae929135002
branches:  trunk
changeset: 429696:2ae929135002
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu Apr 23 16:12:57 2020 +0000

description:
spek: Switch to ffmpeg4. Patch from FreeBSD Ports.

diffstat:

 audio/spek/Makefile                        |   8 +-
 audio/spek/distinfo                        |   3 +-
 audio/spek/patches/patch-src_spek-audio.cc |  62 ++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+), 5 deletions(-)

diffs (106 lines):

diff -r db7b0774fa8e -r 2ae929135002 audio/spek/Makefile
--- a/audio/spek/Makefile       Thu Apr 23 16:07:42 2020 +0000
+++ b/audio/spek/Makefile       Thu Apr 23 16:12:57 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2020/03/10 22:09:25 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2020/04/23 16:12:57 nia Exp $
 
 DISTNAME=      spek-0.8.2
-PKGREVISION=   17
+PKGREVISION=   18
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=alexkay/}
 EXTRACT_SUFX=  .tar.xz
@@ -12,12 +12,12 @@
 LICENSE=       gnu-gpl-v3
 
 GNU_CONFIGURE= yes
-USE_LANGUAGES= c++
+USE_LANGUAGES= c c++
 USE_TOOLS+=    gmake intltool xgettext msgmerge msgfmt pkg-config
 MAKE_FLAGS+=   DATADIRNAME=${PKGLOCALEDIR}
 
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
-.include "../../multimedia/ffmpeg2/buildlink3.mk"
+.include "../../multimedia/ffmpeg4/buildlink3.mk"
 .include "../../sysutils/desktop-file-utils/desktopdb.mk"
 .include "../../x11/wxGTK30/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r db7b0774fa8e -r 2ae929135002 audio/spek/distinfo
--- a/audio/spek/distinfo       Thu Apr 23 16:07:42 2020 +0000
+++ b/audio/spek/distinfo       Thu Apr 23 16:12:57 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 01:12:51 agc Exp $
+$NetBSD: distinfo,v 1.3 2020/04/23 16:12:57 nia Exp $
 
 SHA1 (spek-0.8.2.tar.xz) = 54226094ade52761349869f6e2f72a2af7a41be5
 RMD160 (spek-0.8.2.tar.xz) = 20532e9682e5d5bc9bcfeddb1db0b65d7e5b07f8
 SHA512 (spek-0.8.2.tar.xz) = 166cc2b058a9113497ca562a15b11c44fc47f33f87d1ee3d307adeb64c68940dc4f4323a7c1381541279eb1cbdda614555d0aff18993d99d90f8650018f5be69
 Size (spek-0.8.2.tar.xz) = 171628 bytes
+SHA1 (patch-src_spek-audio.cc) = c0ce3601ecc3855d5688536faa457491fe8f5e6d
diff -r db7b0774fa8e -r 2ae929135002 audio/spek/patches/patch-src_spek-audio.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/spek/patches/patch-src_spek-audio.cc        Thu Apr 23 16:12:57 2020 +0000
@@ -0,0 +1,62 @@
+$NetBSD: patch-src_spek-audio.cc,v 1.1 2020/04/23 16:12:57 nia Exp $
+
+Fix build with ffmpeg>3.
+
+From FreeBSD Ports.
+
+--- src/spek-audio.cc.orig     2013-02-23 02:58:12.000000000 +0000
++++ 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
+@@ -224,7 +224,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) {
+@@ -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);
+@@ -299,7 +299,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;
+@@ -307,7 +307,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.



Home | Main Index | Thread Index | Old Index