From ce0f9d4bcbd7ea82d5c6c893acc33869803a23d6 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 30 Oct 2013 08:05:59 +0100 Subject: [PATCH] lightspark: rebuild against ffmpeg-2.1. --- srcpkgs/lightspark/patches/ffmpeg-2.1.patch | 83 +++++++++++++++++++++ srcpkgs/lightspark/template | 4 +- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/lightspark/patches/ffmpeg-2.1.patch diff --git a/srcpkgs/lightspark/patches/ffmpeg-2.1.patch b/srcpkgs/lightspark/patches/ffmpeg-2.1.patch new file mode 100644 index 00000000000..abb22932656 --- /dev/null +++ b/srcpkgs/lightspark/patches/ffmpeg-2.1.patch @@ -0,0 +1,83 @@ +--- a/src/backends/decoder.h.orig 2013-10-30 07:55:05.457153830 +0100 ++++ b/src/backends/decoder.h 2013-10-30 07:55:36.112654256 +0100 +@@ -28,6 +28,7 @@ extern "C" + { + #include + #include ++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 + #define MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE + } + #else +--- a/src/backends/decoder.cpp.orig 2013-10-30 08:03:28.810362559 +0100 ++++ b/src/backends/decoder.cpp 2013-10-30 08:04:01.937708704 +0100 +@@ -119,7 +119,7 @@ FFMpegVideoDecoder::FFMpegVideoDecoder(L + if(codecId==H264) + { + //TODO: serialize access to avcodec_open +- const enum CodecID FFMPEGcodecId=CODEC_ID_H264; ++ const enum AVCodecID FFMPEGcodecId=AV_CODEC_ID_H264; + codec=avcodec_find_decoder(FFMPEGcodecId); + assert(codec); + //Ignore the frameRateHint as the rate is gathered from the video data +@@ -127,7 +127,7 @@ FFMpegVideoDecoder::FFMpegVideoDecoder(L + else if(codecId==H263) + { + //TODO: serialize access to avcodec_open +- const enum CodecID FFMPEGcodecId=CODEC_ID_FLV1; ++ const enum AVCodecID FFMPEGcodecId=AV_CODEC_ID_FLV1; + codec=avcodec_find_decoder(FFMPEGcodecId); + assert(codec); + +@@ -138,7 +138,7 @@ FFMpegVideoDecoder::FFMpegVideoDecoder(L + else if(codecId==VP6) + { + //TODO: serialize access to avcodec_open +- const enum CodecID FFMPEGcodecId=CODEC_ID_VP6F; ++ const enum AVCodecID FFMPEGcodecId=AV_CODEC_ID_VP6F; + codec=avcodec_find_decoder(FFMPEGcodecId); + assert(codec); + +@@ -176,13 +176,13 @@ FFMpegVideoDecoder::FFMpegVideoDecoder(A + //The tag is the header, initialize decoding + switch(codecContext->codec_id) + { +- case CODEC_ID_H264: ++ case AV_CODEC_ID_H264: + videoCodec=H264; + break; +- case CODEC_ID_FLV1: ++ case AV_CODEC_ID_FLV1: + videoCodec=H263; + break; +- case CODEC_ID_VP6F: ++ case AV_CODEC_ID_VP6F: + videoCodec=VP6; + break; + default: +@@ -451,14 +451,14 @@ void AudioDecoder::skipAll() + #ifdef ENABLE_LIBAVCODEC + FFMpegAudioDecoder::FFMpegAudioDecoder(LS_AUDIO_CODEC audioCodec, uint8_t* initdata, uint32_t datalen):ownedContext(true) + { +- CodecID codecId; ++ AVCodecID codecId; + switch(audioCodec) + { + case AAC: +- codecId=CODEC_ID_AAC; ++ codecId=AV_CODEC_ID_AAC; + break; + case MP3: +- codecId=CODEC_ID_MP3; ++ codecId=AV_CODEC_ID_MP3; + break; + default: + ::abort(); +@@ -711,7 +711,7 @@ FFMpegStreamDecoder::FFMpegStreamDecoder + videoFound=true; + videoIndex=(int32_t)i; + } +- else if(formatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO && formatCtx->streams[i]->codec->codec_id!=CODEC_ID_NONE && audioFound==false) ++ else if(formatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO && formatCtx->streams[i]->codec->codec_id!=AV_CODEC_ID_NONE && audioFound==false) + { + audioFound=true; + audioIndex=(int32_t)i; diff --git a/srcpkgs/lightspark/template b/srcpkgs/lightspark/template index 9d174b27c28..1cb8e62e610 100644 --- a/srcpkgs/lightspark/template +++ b/srcpkgs/lightspark/template @@ -1,14 +1,14 @@ # Template file for 'lightspark' pkgname=lightspark version=0.7.2 -revision=4 +revision=5 patch_args="-Np1" build_style=cmake configure_args="-DAUDIO_BACKEND=pulse -DENABLE_CURL=1 -DCOMPILE_PLUGIN=1 -DCMAKE_SKIP_RPATH=OFF" hostmakedepends="cmake pkg-config nasm" makedepends="zlib-devel pcre-devel>=8.30 libffi-devel libX11-devel - libpng-devel>=1.6 fontconfig-devel boost-devel>=1.54 SDL-devel ffmpeg-devel>=1.2 + libpng-devel>=1.6 fontconfig-devel boost-devel>=1.54 SDL-devel ffmpeg-devel>=2.1 MesaLib-devel ftgl-devel glew-devel>=1.9.0 libxml2-devel libxml++-devel glibmm-devel gtk+-devel libjpeg-turbo-devel pulseaudio-devel llvm>=3.2 librtmp-devel liblzma-devel libcurl-devel"