aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 a6749173..630ae408 100644
--- a/src/media/UAudioDecoder_FFmpeg.pas
+++ b/src/media/UAudioDecoder_FFmpeg.pas
@@ -323,7 +323,11 @@ begin
//Log.LogStatus('AudioStreamIndex is: '+ inttostr(ffmpegStreamID), 'UAudio_FFmpeg');
+{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0
fAudioStream := fFormatCtx.streams[fAudioStreamIndex];
+{$ELSE}
+ fAudioStream := Pointer(fFormatCtx.streams^) + fAudioStreamIndex;
+{$IFEND}
fAudioStreamPos := 0;
fCodecCtx := fAudioStream^.codec;