diff options
author | 2015-02-06 14:24:50 +0000 | |
---|---|---|
committer | 2015-02-06 14:24:50 +0000 | |
commit | d1c812b4461f776d12ea04a648ea2f78873e14fe (patch) | |
tree | 2c5088bb6b500f9c473c622d1d148baf9b1ae221 /media-sound/squeezeslave | |
parent | quick patch to fix build with ffmpeg2; bug #536232 (diff) | |
download | gentoo-2-d1c812b4461f776d12ea04a648ea2f78873e14fe.tar.gz gentoo-2-d1c812b4461f776d12ea04a648ea2f78873e14fe.tar.bz2 gentoo-2-d1c812b4461f776d12ea04a648ea2f78873e14fe.zip |
fix build with ffmpeg2, patch by Rick Moritz in bug #481062 with some extra changes by me for ffmpeg 2.4+
Signed-off-by: aballier@gentoo.org
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-sound/squeezeslave')
-rw-r--r-- | media-sound/squeezeslave/ChangeLog | 9 | ||||
-rw-r--r-- | media-sound/squeezeslave/files/squeezeslave-1.1_p381-ffmpeg2.patch | 133 | ||||
-rw-r--r-- | media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild | 5 |
3 files changed, 143 insertions, 4 deletions
diff --git a/media-sound/squeezeslave/ChangeLog b/media-sound/squeezeslave/ChangeLog index e5a4f0efbcd0..614ef20b3d39 100644 --- a/media-sound/squeezeslave/ChangeLog +++ b/media-sound/squeezeslave/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-sound/squeezeslave -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/ChangeLog,v 1.13 2012/11/24 12:30:53 radhermit Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/ChangeLog,v 1.14 2015/02/06 14:24:50 aballier Exp $ + + 06 Feb 2015; Alexis Ballier <aballier@gentoo.org> + squeezeslave-1.1_p381.ebuild, +files/squeezeslave-1.1_p381-ffmpeg2.patch: + fix build with ffmpeg2, patch by Rick Moritz in bug #481062 with some extra + changes by me for ffmpeg 2.4+ 24 Nov 2012; Tim Harder <radhermit@gentoo.org> -squeezeslave-1.1_p312.ebuild, -squeezeslave-1.1_p350.ebuild, -files/squeezeslave-1.1_p309-ffmpeg.patch, diff --git a/media-sound/squeezeslave/files/squeezeslave-1.1_p381-ffmpeg2.patch b/media-sound/squeezeslave/files/squeezeslave-1.1_p381-ffmpeg2.patch new file mode 100644 index 000000000000..d72aa04533dd --- /dev/null +++ b/media-sound/squeezeslave/files/squeezeslave-1.1_p381-ffmpeg2.patch @@ -0,0 +1,133 @@ +Index: squeezeslave-1.1_p381/src/slimaudio/slimaudio_decoder.c +=================================================================== +--- squeezeslave-1.1_p381.orig/src/slimaudio/slimaudio_decoder.c ++++ squeezeslave-1.1_p381/src/slimaudio/slimaudio_decoder.c +@@ -69,7 +69,6 @@ void av_lib_setup (void) + av_register_all(); + DEBUGF("decoder_thread: av_register_all\n"); + +- avcodec_init(); + avcodec_register_all(); + DEBUGF("decoder_thread: avcodec_register_all\n"); + +Index: squeezeslave-1.1_p381/src/slimaudio/slimaudio_decoder_aac.c +=================================================================== +--- squeezeslave-1.1_p381.orig/src/slimaudio/slimaudio_decoder_aac.c ++++ squeezeslave-1.1_p381/src/slimaudio/slimaudio_decoder_aac.c +@@ -47,6 +47,11 @@ + + #define AUDIO_INBUF_SIZE (AUDIO_CHUNK_SIZE*2) + ++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE ++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio ++#endif ++ ++ + int slimaudio_decoder_aac_init(slimaudio_t *audio) + { + av_lib_setup(); +@@ -164,7 +169,7 @@ int slimaudio_decoder_aac_process(slimau + } + else + { +- AVIOCtx->is_streamed = 1; ++ AVIOCtx->seekable = 0; + } + + AVInputFormat* pAVInputFormat = av_find_input_format(streamformat); +@@ -199,7 +204,7 @@ int slimaudio_decoder_aac_process(slimau + } + else + { +- iRC = av_find_stream_info(pFormatCtx); ++ iRC = avformat_find_stream_info(pFormatCtx, NULL); + if ( iRC < 0 ) + { + DEBUGF("aac: find stream info failed:%d\n", iRC); +@@ -236,7 +241,7 @@ int slimaudio_decoder_aac_process(slimau + } + + /* Open codec */ +- iRC = avcodec_open(pCodecCtx, pCodec); ++ iRC = avcodec_open2(pCodecCtx, pCodec, NULL); + if ( iRC < 0) + { + DEBUGF("aac: could not open codec:%d\n", iRC); +@@ -274,7 +279,7 @@ int slimaudio_decoder_aac_process(slimau + eos=true; + } + +- if ( url_ferror(pFormatCtx->pb) ) ++ if ( pFormatCtx->pb && pFormatCtx->pb->error ) + { + DEBUGF("aac: url_ferror\n"); + #if 0 +@@ -312,7 +317,7 @@ int slimaudio_decoder_aac_process(slimau + + /* Close the stream */ + DEBUGF ("aac: av_close_input_stream\n"); +- av_close_input_stream(pFormatCtx); ++ avformat_close_input(&pFormatCtx); + + return 0; + } +Index: squeezeslave-1.1_p381/src/slimaudio/slimaudio_decoder_wma.c +=================================================================== +--- squeezeslave-1.1_p381.orig/src/slimaudio/slimaudio_decoder_wma.c ++++ squeezeslave-1.1_p381/src/slimaudio/slimaudio_decoder_wma.c +@@ -47,6 +47,10 @@ + + #define AUDIO_INBUF_SIZE (AUDIO_CHUNK_SIZE*2) + ++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE ++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio ++#endif ++ + int slimaudio_decoder_wma_init(slimaudio_t *audio) + { + av_lib_setup(); +@@ -159,7 +163,7 @@ int slimaudio_decoder_wma_process(slimau + } + else + { +- AVIOCtx->is_streamed = 1; ++ AVIOCtx->seekable = 1; + } + + AVInputFormat* pAVInputFormat = av_find_input_format(streamformat); +@@ -194,7 +198,7 @@ int slimaudio_decoder_wma_process(slimau + } + else + { +- iRC = av_find_stream_info(pFormatCtx); ++ iRC = avformat_find_stream_info(pFormatCtx,NULL); + if ( iRC < 0 ) + { + DEBUGF("wma: find stream info failed:%d\n", iRC); +@@ -231,7 +235,7 @@ int slimaudio_decoder_wma_process(slimau + } + + /* Open codec */ +- iRC = avcodec_open(pCodecCtx, pCodec); ++ iRC = avcodec_open2(pCodecCtx, pCodec, NULL); + if ( iRC < 0) + { + DEBUGF("wma: could not open codec:%d\n", iRC); +@@ -270,7 +274,7 @@ int slimaudio_decoder_wma_process(slimau + eos=true; + } + +- if ( url_ferror(pFormatCtx->pb) ) ++ if ( pFormatCtx->pb && pFormatCtx->pb->error ) + { + DEBUGF("wma: url_ferror\n"); + #if 0 +@@ -308,7 +312,7 @@ int slimaudio_decoder_wma_process(slimau + + /* Close the stream */ + DEBUGF ("wma: av_close_input_stream\n"); +- av_close_input_stream(pFormatCtx); ++ avformat_close_input(&pFormatCtx); + + return 0; + } diff --git a/media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild b/media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild index ad74b8c3b48a..4bbba7a53a69 100644 --- a/media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild +++ b/media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild,v 1.1 2012/11/24 12:29:28 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeslave/squeezeslave-1.1_p381.ebuild,v 1.2 2015/02/06 14:24:50 aballier Exp $ EAPI="5" @@ -30,6 +30,7 @@ DEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${PN}-1.1_p350-tremor-headers.patch + epatch "${FILESDIR}"/${PN}-1.1_p381-ffmpeg2.patch } src_compile() { |