sox: update ffmpeg patches for 2.4.x (deprecated functions), add myself as pkg maintainer
Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
parent
6b11fa45d9
commit
122e36be3a
2 changed files with 34 additions and 4 deletions
|
@ -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 <thess@kitschensync.net>
|
||||
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 <hcg@openwrt.org>
|
||||
endef
|
||||
|
||||
define Package/sox/description
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue