aboutsummaryrefslogtreecommitdiffstats
path: root/src/media/UAudioDecoder_FFmpeg.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/media/UAudioDecoder_FFmpeg.pas4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas
index 4d02c260..75bfa75b 100644
--- a/src/media/UAudioDecoder_FFmpeg.pas
+++ b/src/media/UAudioDecoder_FFmpeg.pas
@@ -80,7 +80,11 @@ const
const
// TODO: The factor 3/2 might not be necessary as we do not need extra
// space for synchronizing as in the tutorial.
+{$IF FFMPEG_VERSION_INT >= 2000000}
+ AUDIO_BUFFER_SIZE = (192000 * 3) div 2;
+{$ELSE}
AUDIO_BUFFER_SIZE = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) div 2;
+{$ENDIF}
type
TFFmpegDecodeStream = class(TAudioDecodeStream)