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/files | |
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/files')
4 files changed, 99 insertions, 0 deletions
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]; |