aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config-darwin.inc3
-rw-r--r--src/config.inc.in1
-rw-r--r--src/media/UAudioDecoder_FFmpeg.pas4
3 files changed, 8 insertions, 0 deletions
diff --git a/src/config-darwin.inc b/src/config-darwin.inc
index eff33d4f..edfceb47 100644
--- a/src/config-darwin.inc
+++ b/src/config-darwin.inc
@@ -20,12 +20,15 @@
{$IFNDEF FFMPEG_DIR}
{$IF (8 > 0) or (0 > 0)}
{$DEFINE FFMPEG_DIR := 'ffmpeg-0.8'}
+ {$DEFINE FF_API_OLD_DECODE_AUDIO}
{$ELSE}
{$DEFINE FFMPEG_DIR := 'ffmpeg'}
{$DEFINE useOLD_FFMPEG}
{$IFEND}
{$ENDIF}
{$IF Defined(IncludeConstants)}
+ FFMPEG_VERSION_INT = 8000;
+
av__codec = 'libavcodec';
LIBAVCODEC_VERSION_MAJOR = 53;
LIBAVCODEC_VERSION_MINOR = 8;
diff --git a/src/config.inc.in b/src/config.inc.in
index 97b0f604..967612a4 100644
--- a/src/config.inc.in
+++ b/src/config.inc.in
@@ -20,6 +20,7 @@
{$IFNDEF FFMPEG_DIR}
{$IF (@FFMPEG_VERSION_MINOR@ > 0) or (@FFMPEG_VERSION_MAJOR@ > 0)}
{$DEFINE FFMPEG_DIR := 'ffmpeg-@FFMPEG_VERSION_MAJOR@.@FFMPEG_VERSION_MINOR@'}
+ {$DEFINE FF_API_OLD_DECODE_AUDIO}
{$ELSE}
{$DEFINE FFMPEG_DIR := 'ffmpeg'}
{$DEFINE useOLD_FFMPEG}
diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas
index 7d62d761..0cdf9555 100644
--- a/src/media/UAudioDecoder_FFmpeg.pas
+++ b/src/media/UAudioDecoder_FFmpeg.pas
@@ -690,7 +690,11 @@ function TFFmpegDecodeStream.ParseLoop(): boolean;
var
Packet: TAVPacket;
SeekTarget: int64;
+ {$IF FFMPEG_VERSION_INT < 1001000}
ByteIOCtx: PByteIOContext;
+ {$ELSE}
+ ByteIOCtx: PAVIOContext;
+ {$ENDIF}
ErrorCode: integer;
StartSilence: double; // duration of silence at start of stream
StartSilencePtr: PDouble; // pointer for the EMPTY status packet