]> git.pld-linux.org Git - packages/sox.git/commitdiff
- fixed build with new ffmpeg auto/ti/sox-14_3_2-2
authorlisu <lisu@pld-linux.org>
Tue, 5 Jul 2011 13:25:00 +0000 (13:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    sox-ffmpeg.patch -> 1.3
    sox.spec -> 1.72

sox-ffmpeg.patch [new file with mode: 0644]
sox.spec

diff --git a/sox-ffmpeg.patch b/sox-ffmpeg.patch
new file mode 100644 (file)
index 0000000..6b9d026
--- /dev/null
@@ -0,0 +1,39 @@
+Index: sox-14.3.2/src/ffmpeg.c
+===================================================================
+--- sox-14.3.2.orig/src/ffmpeg.c
++++ sox-14.3.2/src/ffmpeg.c
+@@ -91,7 +91,7 @@ static int stream_component_open(priv_t
+   if (!codec || avcodec_open(enc, codec) < 0)
+     return -1;
+-  if (enc->codec_type != CODEC_TYPE_AUDIO) {
++  if (enc->codec_type != AVMEDIA_TYPE_AUDIO) {
+     lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type);
+     return -1;
+   }
+@@ -182,7 +182,7 @@ static int startread(sox_format_t * ft)
+   /* Find audio stream (FIXME: allow different stream to be selected) */
+   for (i = 0; (unsigned)i < ffmpeg->ctxt->nb_streams; i++) {
+     AVCodecContext *enc = ffmpeg->ctxt->streams[i]->codec;
+-    if (enc->codec_type == CODEC_TYPE_AUDIO && ffmpeg->audio_index < 0) {
++    if (enc->codec_type == AVMEDIA_TYPE_AUDIO && ffmpeg->audio_index < 0) {
+       ffmpeg->audio_index = i;
+       break;
+     }
+@@ -273,7 +273,7 @@ static AVStream *add_audio_stream(sox_fo
+   c = st->codec;
+   c->codec_id = codec_id;
+-  c->codec_type = CODEC_TYPE_AUDIO;
++  c->codec_type = AVMEDIA_TYPE_AUDIO;
+   /* put sample parameters */
+   c->bit_rate = 256000;  /* FIXME: allow specification */
+@@ -423,7 +423,7 @@ static size_t write_samples(sox_format_t
+       av_init_packet(&pkt);
+       pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples);
+       pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, ffmpeg->audio_st->time_base);
+-      pkt.flags |= PKT_FLAG_KEY;
++      pkt.flags |= AV_PKT_FLAG_KEY;
+       pkt.stream_index = ffmpeg->audio_st->index;
+       pkt.data = ffmpeg->audio_buf_aligned;
index 681c0fcb3790eb31e7c5628386a6e683db3c878c..fbb4a4dec15381154910c8624d5b0918fece86ed 100644 (file)
--- a/sox.spec
+++ b/sox.spec
@@ -23,11 +23,12 @@ Source0:    http://downloads.sourceforge.net/sox/%{name}-%{version}.tar.gz
 # Source0-md5: e9d35cf3b0f8878596e0b7c49f9e8302
 Patch0:                %{name}-system-lpc10.patch
 Patch1:                %{name}-dyn.patch
+Patch2:                %{name}-ffmpeg.patch
 URL:           http://sox.sourceforge.net/
 %{?with_alsa:BuildRequires:    alsa-lib-devel}
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
-BuildRequires: ffmpeg-devel >= 0.4.9-4.20080930.1
+BuildRequires: ffmpeg-devel >= 0.7.1
 BuildRequires: flac-devel
 %{?with_gomp:BuildRequires:    gcc >= 6:4.2}
 BuildRequires: ladspa-devel
@@ -175,6 +176,7 @@ bibliotekÄ™ libmad, a do kodowania - LAME.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
This page took 0.0904509999999999 seconds and 4 git commands to generate.