void-packages/srcpkgs/lightspark/patches/ffmpeg-2.1.patch

84 lines
2.7 KiB
Diff

--- 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 <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
+#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;