Browse Source

sox: update ffmpeg patches for 2.4.x (deprecated functions), add myself as pkg maintainer

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 10 years ago
parent
commit
122e36be3a
2 changed files with 34 additions and 4 deletions
  1. 3
    2
      sound/sox/Makefile
  2. 31
    2
      sound/sox/patches/020-ffmpeg-2.x.patch

+ 3
- 2
sound/sox/Makefile View File

@@ -10,15 +10,17 @@ include $(TOPDIR)/rules.mk
10 10
 
11 11
 PKG_NAME:=sox
12 12
 PKG_VERSION:=14.4.1
13
-PKG_RELEASE:=2
13
+PKG_RELEASE:=3
14 14
 
15 15
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 16
 PKG_SOURCE_URL:=@SF/sox
17 17
 PKG_MD5SUM:=ff9ca6aca972549de0e80e8e30ed379c
18 18
 
19
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
19 20
 PKG_LICENSE:=LGPL-2.1 GPL-2.0
20 21
 PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL
21 22
 
23
+
22 24
 PKG_INSTALL:=1
23 25
 
24 26
 include $(INCLUDE_DIR)/package.mk
@@ -34,7 +36,6 @@ define Package/sox
34 36
 		+libmagic +libpng +libffmpeg
35 37
   TITLE:=Sox is a general purpose sound converter/player/recorder
36 38
   URL:=http://sox.sourceforge.net/
37
-  MAINTAINER:=Hamish Guthrie <hcg@openwrt.org>
38 39
 endef
39 40
 
40 41
 define Package/sox/description

+ 31
- 2
sound/sox/patches/020-ffmpeg-2.x.patch View File

@@ -20,7 +20,25 @@
20 20
      return -1;
21 21
    if (enc->codec_type != AVMEDIA_TYPE_AUDIO) {
22 22
      lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type);
23
-@@ -267,7 +271,11 @@ static int stopread(sox_format_t * ft)
23
+@@ -178,7 +182,7 @@ static int startread(sox_format_t * ft)
24
+   }
25
+ 
26
+   /* Get CODEC parameters */
27
+-  if ((ret = av_find_stream_info(ffmpeg->ctxt)) < 0) {
28
++  if ((ret = avformat_find_stream_info(ffmpeg->ctxt, NULL)) < 0) {
29
+     lsx_fail("ffmpeg could not find CODEC parameters for %s", ft->filename);
30
+     return SOX_EOF;
31
+   }
32
+@@ -256,7 +260,7 @@ static int stopread(sox_format_t * ft)
33
+   if (ffmpeg->audio_stream >= 0)
34
+     stream_component_close(ffmpeg, ffmpeg->audio_stream);
35
+   if (ffmpeg->ctxt) {
36
+-    av_close_input_file(ffmpeg->ctxt);
37
++    avformat_close_input(&ffmpeg->ctxt);
38
+     ffmpeg->ctxt = NULL; /* safety */
39
+   }
40
+ 
41
+@@ -267,16 +271,21 @@ static int stopread(sox_format_t * ft)
24 42
  /*
25 43
   * add an audio output stream
26 44
   */
@@ -32,7 +50,18 @@
32 50
  {
33 51
    AVCodecContext *c;
34 52
    AVStream *st;
35
-@@ -306,7 +314,7 @@ static int open_audio(priv_t * ffmpeg, A
53
+ 
54
+-  st = av_new_stream(oc, 1);
55
++  st = avformat_new_stream(oc, NULL);
56
+   if (!st) {
57
+     lsx_fail("ffmpeg could not alloc stream");
58
+     return NULL;
59
+   }
60
++  st->id = 1;
61
+ 
62
+   c = st->codec;
63
+   c->codec_id = codec_id;
64
+@@ -306,7 +315,7 @@ static int open_audio(priv_t * ffmpeg, A
36 65
    }
37 66
  
38 67
    /* open it */