aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/media/UAudioDecoder_FFmpeg.pas6
-rw-r--r--src/media/UMediaCore_FFmpeg.pas4
-rw-r--r--src/media/UVideo.pas2
3 files changed, 4 insertions, 8 deletions
diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas
index 792655b2..6db1454d 100644
--- a/src/media/UAudioDecoder_FFmpeg.pas
+++ b/src/media/UAudioDecoder_FFmpeg.pas
@@ -345,7 +345,7 @@ begin
{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0
fAudioStream := fFormatCtx.streams[fAudioStreamIndex];
{$ELSE}
- fAudioStream := (fFormatCtx.streams + fAudioStreamIndex)^;
+ fAudioStream := PPAVStream(PtrUInt(fFormatCtx.streams) + fAudioStreamIndex * Sizeof(pointer))^;
{$IFEND}
fAudioStreamPos := 0;
fCodecCtx := fAudioStream^.codec;
@@ -936,10 +936,6 @@ var
{$IFDEF DebugFFmpegDecode}
TmpPos: double;
{$ENDIF}
- {$IF LIBAVCODEC_VERSION >= 5300500}
- AVFrame: PAVFrame;
- got_frame_ptr: integer;
- {$IFEND}
begin
Result := -1;
diff --git a/src/media/UMediaCore_FFmpeg.pas b/src/media/UMediaCore_FFmpeg.pas
index dd8ddf07..c9e61c4a 100644
--- a/src/media/UMediaCore_FFmpeg.pas
+++ b/src/media/UMediaCore_FFmpeg.pas
@@ -270,7 +270,7 @@ begin
{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0
Stream := FormatCtx.streams[i];
{$ELSE}
- Stream := (FormatCtx.streams + i)^;
+ Stream := PPAVStream(PtrUInt(FormatCtx.streams) + i * Sizeof(pointer))^;
{$IFEND}
{$IF LIBAVCODEC_VERSION < 52064000} // < 52.64.0
@@ -320,7 +320,7 @@ begin
{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0
Stream := FormatCtx^.streams[i];
{$ELSE}
- Stream := (FormatCtx^.streams + i)^;
+ Stream := PPAVStream(PtrUInt(FormatCtx^.streams) + i * Sizeof(pointer))^;
{$IFEND}
{$IF LIBAVCODEC_VERSION < 52064000} // < 52.64.0
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index eaffa9ea..605eec78 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -359,7 +359,7 @@ begin
{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0
fStream := fFormatContext^.streams[fStreamIndex];
{$ELSE}
- fStream := (fFormatContext^.streams + fStreamIndex)^;
+ fStream := PPAVStream(PtrUInt(fFormatContext^.streams) + fStreamIndex * Sizeof(pointer))^;
{$IFEND}
fCodecContext := fStream^.codec;