aboutsummaryrefslogtreecommitdiffstats
path: root/src/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/media')
-rw-r--r--src/media/UVideo.pas14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index 1c4f065d..5e083b9a 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -81,7 +81,11 @@ uses
const
{$IFDEF PIXEL_FMT_BGR}
PIXEL_FMT_OPENGL = GL_BGR;
+ {$IF FFMPEG_VERSION_INT < 1001000}
PIXEL_FMT_FFMPEG = PIX_FMT_BGR24;
+ {$ELSE}
+ PIXEL_FMT_FFMPEG = AV_PIX_FMT_BGR24;
+ {$ENDIF}
PIXEL_FMT_SIZE = 3;
// looks strange on linux:
@@ -91,7 +95,11 @@ const
{$ELSE}
// looks strange on linux:
PIXEL_FMT_OPENGL = GL_RGB;
- PIXEL_FMT_FFMPEG = PIX_FMT_RGB24;
+ {$IF FFMPEG_VERSION_INT < 1001000}
+ PIXEL_FMT_FFMPEG = PIX_FMT_BGR24;
+ {$ELSE}
+ PIXEL_FMT_FFMPEG = AV_PIX_FMT_BGR24;
+ {$ENDIF}
PIXEL_FMT_SIZE = 3;
{$ENDIF}
@@ -634,7 +642,11 @@ function TVideo_FFmpeg.DecodeFrame(): boolean;
var
FrameFinished: Integer;
VideoPktPts: int64;
+ {$IF FFMPEG_VERSION_INT < 1001000}
pbIOCtx: PByteIOContext;
+ {$ELSE}
+ pbIOCtx: PAVIOContext;
+ {$ENDIF}
errnum: integer;
AVPacket: TAVPacket;
pts: double;