From 36021280b42ab0f04d762acbaa0814085d89ce55 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Thu, 18 Jul 2013 21:34:29 +0000 Subject: fix version detection of libavformat git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3000 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UVideo.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/media/UVideo.pas') diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas index 949a66c2..1c4f065d 100644 --- a/src/media/UVideo.pas +++ b/src/media/UVideo.pas @@ -323,10 +323,10 @@ begin fPboEnabled := PboSupported; // use custom 'ufile' protocol for UTF-8 support - {$IF LIBAVFORMAT_VERSION < 54029104} - errnum := avformat_open_input(@fFormatContext, PAnsiChar('ufile:'+FileName.ToUTF8), nil, nil); - {$ELSEIF LIBAVFORMAT_VERSION < 53001003} + {$IF LIBAVFORMAT_VERSION < 53001003} errnum := av_open_input_file(fFormatContext, PAnsiChar('ufile:'+FileName.ToUTF8), nil, 0, nil); + {$ELSEIF LIBAVFORMAT_VERSION < 54029104} + errnum := avformat_open_input(@fFormatContext, PAnsiChar('ufile:'+FileName.ToUTF8), nil, nil); {$ELSE} errnum := FFmpegCore.AVFormatOpenInput(@fFormatContext, PAnsiChar('ufile:'+FileName.ToUTF8)); {$IFEND} @@ -586,10 +586,10 @@ begin end; if (fFormatContext <> nil) then - {$IF LIBAVFORMAT_VERSION < 54029104} - avformat_close_input(@fFormatContext); - {$ELSEIF LIBAVFORMAT_VERSION < 53024002)} + {$IF LIBAVFORMAT_VERSION < 53024002)} av_close_input_file(fFormatContext); + {$ELSEIF LIBAVFORMAT_VERSION < 54029104} + avformat_close_input(@fFormatContext); {$ELSE} FFmpegCore.AVFormatCloseInput(@fFormatContext); {$IFEND} -- cgit v1.2.3