From 122e36be3a37e3192a8963eb20a5e090a4bc915a Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Sat, 1 Nov 2014 19:44:12 -0400 Subject: [PATCH] sox: update ffmpeg patches for 2.4.x (deprecated functions), add myself as pkg maintainer Signed-off-by: Ted Hess --- sound/sox/Makefile | 5 ++-- sound/sox/patches/020-ffmpeg-2.x.patch | 33 ++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/sound/sox/Makefile b/sound/sox/Makefile index 8fa5713257..eda080fa8b 100644 --- a/sound/sox/Makefile +++ b/sound/sox/Makefile @@ -10,15 +10,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sox PKG_VERSION:=14.4.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/sox PKG_MD5SUM:=ff9ca6aca972549de0e80e8e30ed379c +PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=LGPL-2.1 GPL-2.0 PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL + PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -34,7 +36,6 @@ define Package/sox +libmagic +libpng +libffmpeg TITLE:=Sox is a general purpose sound converter/player/recorder URL:=http://sox.sourceforge.net/ - MAINTAINER:=Hamish Guthrie endef define Package/sox/description diff --git a/sound/sox/patches/020-ffmpeg-2.x.patch b/sound/sox/patches/020-ffmpeg-2.x.patch index 5770145649..44e7ebbe98 100644 --- a/sound/sox/patches/020-ffmpeg-2.x.patch +++ b/sound/sox/patches/020-ffmpeg-2.x.patch @@ -20,7 +20,25 @@ return -1; if (enc->codec_type != AVMEDIA_TYPE_AUDIO) { lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type); -@@ -267,7 +271,11 @@ static int stopread(sox_format_t * ft) +@@ -178,7 +182,7 @@ static int startread(sox_format_t * ft) + } + + /* Get CODEC parameters */ +- if ((ret = av_find_stream_info(ffmpeg->ctxt)) < 0) { ++ if ((ret = avformat_find_stream_info(ffmpeg->ctxt, NULL)) < 0) { + lsx_fail("ffmpeg could not find CODEC parameters for %s", ft->filename); + return SOX_EOF; + } +@@ -256,7 +260,7 @@ static int stopread(sox_format_t * ft) + if (ffmpeg->audio_stream >= 0) + stream_component_close(ffmpeg, ffmpeg->audio_stream); + if (ffmpeg->ctxt) { +- av_close_input_file(ffmpeg->ctxt); ++ avformat_close_input(&ffmpeg->ctxt); + ffmpeg->ctxt = NULL; /* safety */ + } + +@@ -267,16 +271,21 @@ static int stopread(sox_format_t * ft) /* * add an audio output stream */ @@ -32,7 +50,18 @@ { AVCodecContext *c; AVStream *st; -@@ -306,7 +314,7 @@ static int open_audio(priv_t * ffmpeg, A + +- st = av_new_stream(oc, 1); ++ st = avformat_new_stream(oc, NULL); + if (!st) { + lsx_fail("ffmpeg could not alloc stream"); + return NULL; + } ++ st->id = 1; + + c = st->codec; + c->codec_id = codec_id; +@@ -306,7 +315,7 @@ static int open_audio(priv_t * ffmpeg, A } /* open it */ -- 2.30.2