aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/media/UMediaCore_FFmpeg.pas8
-rw-r--r--src/media/UVideo.pas4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/media/UMediaCore_FFmpeg.pas b/src/media/UMediaCore_FFmpeg.pas
index ffc7b1c5..865c9fa9 100644
--- a/src/media/UMediaCore_FFmpeg.pas
+++ b/src/media/UMediaCore_FFmpeg.pas
@@ -266,7 +266,11 @@ begin
for i := 0 to FormatCtx.nb_streams-1 do
begin
+{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0
Stream := FormatCtx.streams[i];
+{$ELSE}
+ Stream := Pointer(FormatCtx.streams^) + i;
+{$IFEND}
{$IF LIBAVCODEC_VERSION < 52064000} // < 52.64.0
if (Stream.codec.codec_type = CODEC_TYPE_VIDEO) and
@@ -312,7 +316,11 @@ begin
for i := 0 to FormatCtx^.nb_streams-1 do
begin
+{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0
Stream := FormatCtx^.streams[i];
+{$ELSE}
+ Stream := Pointer(FormatCtx^.streams^) + i;
+{$IFEND}
{$IF LIBAVCODEC_VERSION < 52064000} // < 52.64.0
if (Stream.codec^.codec_type = CODEC_TYPE_AUDIO) then
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index b3030b0c..339c441d 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -347,7 +347,11 @@ begin
Exit;
end;
+{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0
fStream := fFormatContext^.streams[fStreamIndex];
+{$ELSE}
+ fStream := Pointer(fFormatContext^.streams^) + fStreamIndex;
+{$IFEND}
fCodecContext := fStream^.codec;
fCodec := avcodec_find_decoder(fCodecContext^.codec_id);