diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2011-07-02 21:09:02 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2011-07-02 21:09:02 +0000 |
commit | 6c8506c273b375e889c160a7303a555e3eae344f (patch) | |
tree | 8d16f9be078ddc8613872e10cce6c6f17fb21f54 /www-plugins/gnash | |
parent | [sys-infiniband] Add prefix support and keywords (diff) | |
download | gentoo-2-6c8506c273b375e889c160a7303a555e3eae344f.tar.gz gentoo-2-6c8506c273b375e889c160a7303a555e3eae344f.tar.bz2 gentoo-2-6c8506c273b375e889c160a7303a555e3eae344f.zip |
Fix building against ffmpeg-0.8, bug #362949
(Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
Diffstat (limited to 'www-plugins/gnash')
6 files changed, 115 insertions, 4 deletions
diff --git a/www-plugins/gnash/ChangeLog b/www-plugins/gnash/ChangeLog index 4f9acbd7990b..afc4a0da2d3f 100644 --- a/www-plugins/gnash/ChangeLog +++ b/www-plugins/gnash/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-plugins/gnash # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/ChangeLog,v 1.63 2011/06/26 15:03:00 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/ChangeLog,v 1.64 2011/07/02 21:09:02 chithanh Exp $ + + 02 Jul 2011; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + gnash-0.8.9.ebuild, + +files/gnash-0.8.9-no-deprecated-avcodec-audio-resample.patch, + +files/gnash-0.8.9-no-deprecated-avcodec-decode-audio.patch, + +files/gnash-0.8.9-no-deprecated-avcodec-decode-video.patch, + +files/gnash-0.8.9-no-deprecated-avformat-metadata.patch: + Fix building against ffmpeg-0.8, bug #362949 26 Jun 2011; Brent Baude <ranger@gentoo.org> gnash-0.8.8.ebuild: Marking gnash-0.8.8 ppc for bug 339102 diff --git a/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-audio-resample.patch b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-audio-resample.patch new file mode 100644 index 000000000000..675b6eec6fba --- /dev/null +++ b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-audio-resample.patch @@ -0,0 +1,16 @@ +diff -ur a/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp b/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp +--- a/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp 2011-02-26 19:11:08.000000000 +0100 ++++ b/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp 2011-07-02 22:45:54.804995296 +0200 +@@ -46,8 +46,10 @@ + { + if ( (ctx->sample_rate != 44100) || (ctx->channels != 2) ) { + if ( ! _context ) { +- _context = audio_resample_init( +- 2, ctx->channels, 44100, ctx->sample_rate ++ _context = av_audio_resample_init( ++ 2, ctx->channels, 44100, ctx->sample_rate, ++ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16, ++ 16, 10, 0, 0.8 + ); + } + diff --git a/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-decode-audio.patch b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-decode-audio.patch new file mode 100644 index 000000000000..513d7f79723b --- /dev/null +++ b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-decode-audio.patch @@ -0,0 +1,26 @@ +diff -ur a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp +--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 2011-02-26 19:11:08.000000000 +0100 ++++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 2011-07-02 21:03:32.785996541 +0200 +@@ -29,7 +29,7 @@ + + //#define GNASH_DEBUG_AUDIO_DECODING + +-#define AVCODEC_DECODE_AUDIO avcodec_decode_audio2 ++#define AVCODEC_DECODE_AUDIO avcodec_decode_audio3 + + namespace gnash { + namespace media { +@@ -549,8 +549,12 @@ + #endif + + // older ffmpeg versions didn't accept a const input.. ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = (uint8_t*) input; ++ pkt.size = inputSize; + int tmp = AVCODEC_DECODE_AUDIO(_audioCodecCtx, outPtr, &outSize, +- input, inputSize); ++ &pkt); + + #ifdef GNASH_DEBUG_AUDIO_DECODING + log_debug(" avcodec_decode_audio[2](ctx, bufptr, %d, input, %d) " diff --git a/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-decode-video.patch b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-decode-video.patch new file mode 100644 index 000000000000..f73506260ef2 --- /dev/null +++ b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avcodec-decode-video.patch @@ -0,0 +1,18 @@ +diff -ur a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp +--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp 2011-03-13 17:47:36.000000000 +0100 ++++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp 2011-07-02 21:40:28.026996093 +0200 +@@ -356,8 +356,12 @@ + + int bytes = 0; + // no idea why avcodec_decode_video wants a non-const input... +- avcodec_decode_video(_videoCodecCtx->getContext(), frame, &bytes, +- input, input_size); ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = (uint8_t*) input; ++ pkt.size = input_size; ++ avcodec_decode_video2(_videoCodecCtx->getContext(), frame, &bytes, ++ &pkt); + + if (!bytes) { + log_error("Decoding of a video frame failed"); diff --git a/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avformat-metadata.patch b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avformat-metadata.patch new file mode 100644 index 000000000000..dcfb24cb20f9 --- /dev/null +++ b/www-plugins/gnash/files/gnash-0.8.9-no-deprecated-avformat-metadata.patch @@ -0,0 +1,39 @@ +diff -ur a/libmedia/ffmpeg/MediaParserFfmpeg.cpp b/libmedia/ffmpeg/MediaParserFfmpeg.cpp +--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp 2011-03-13 17:47:36.000000000 +0100 ++++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp 2011-07-02 22:29:55.889995495 +0200 +@@ -387,7 +387,7 @@ + + log_debug("Parsing FFMPEG media file: format:%s; nstreams:%d", + _inputFmt->name, _formatCtx->nb_streams); +- ++ /* + if ( _formatCtx->title[0] ) + log_debug(_(" Title:'%s'"), _formatCtx->title); + if ( _formatCtx->author[0] ) +@@ -398,7 +398,7 @@ + log_debug(_(" Comment:'%s'"), _formatCtx->comment); + if ( _formatCtx->album[0] ) + log_debug(_(" Album:'%s'"), _formatCtx->album); +- ++ */ + // Find first audio and video stream + for (unsigned int i = 0; i < static_cast<unsigned int>(_formatCtx->nb_streams); i++) + { +@@ -415,7 +415,7 @@ + } + + switch (enc->codec_type) { +- case CODEC_TYPE_AUDIO: ++ case AVMEDIA_TYPE_AUDIO: + if (_audioStreamIndex < 0) { + _audioStreamIndex = i; + _audioStream = _formatCtx->streams[i]; +@@ -425,7 +425,7 @@ + } + break; + +- case CODEC_TYPE_VIDEO: ++ case AVMEDIA_TYPE_VIDEO: + if (_videoStreamIndex < 0) { + _videoStreamIndex = i; + _videoStream = _formatCtx->streams[i]; diff --git a/www-plugins/gnash/gnash-0.8.9.ebuild b/www-plugins/gnash/gnash-0.8.9.ebuild index c6b4f95990c5..117c9394095a 100644 --- a/www-plugins/gnash/gnash-0.8.9.ebuild +++ b/www-plugins/gnash/gnash-0.8.9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/gnash-0.8.9.ebuild,v 1.6 2011/06/07 02:47:28 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/gnash-0.8.9.ebuild,v 1.7 2011/07/02 21:09:02 chithanh Exp $ EAPI=3 CMAKE_REQUIRED="never" @@ -15,7 +15,7 @@ HOMEPAGE="http://www.gnu.org/software/gnash/" if [[ ${PV} = 9999* ]]; then SRC_URI="" EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git" - inherit git + inherit git-2 else SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2" fi @@ -152,8 +152,12 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-0.8.9-libavcodec-version.patch epatch "${FILESDIR}"/${PN}-0.8.9-look-harder-for-version_h.patch - # Fix linking against recent ffmpeg, bug #362949, upstream #107657 + # Fix building against ffmpeg-0.8, bug #362949, upstream #33696 + epatch "${FILESDIR}"/${PN}-0.8.9-no-deprecated-avcodec-audio-resample.patch + epatch "${FILESDIR}"/${PN}-0.8.9-no-deprecated-avcodec-decode-audio.patch + epatch "${FILESDIR}"/${PN}-0.8.9-no-deprecated-avcodec-decode-video.patch epatch "${FILESDIR}"/${PN}-0.8.9-no-deprecated-avcodec-parser.patch + epatch "${FILESDIR}"/${PN}-0.8.9-no-deprecated-avformat-metadata.patch # Fix building on ppc64, bug #342535 use ppc64 && append-flags -mminimal-toc |