From a537d34f9306bf50391d295f87bde4fdaeccc3e6 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Fri, 11 May 2012 05:51:14 +0000 Subject: correct versions and prepare logic of file opening for ffmpeg-0.8 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2882 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UAudioDecoder_FFmpeg.pas | 2 +- src/media/UMediaCore_FFmpeg.pas | 10 +++++----- src/media/UVideo.pas | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/media') diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas index 0a760e43..6b4f0cba 100644 --- a/src/media/UAudioDecoder_FFmpeg.pas +++ b/src/media/UAudioDecoder_FFmpeg.pas @@ -332,7 +332,7 @@ begin //Log.LogStatus('AudioStreamIndex is: '+ inttostr(ffmpegStreamID), 'UAudio_FFmpeg'); -{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 +{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0 fAudioStream := fFormatCtx.streams[fAudioStreamIndex]; {$ELSE} fAudioStream := Pointer(fFormatCtx.streams^) + fAudioStreamIndex; diff --git a/src/media/UMediaCore_FFmpeg.pas b/src/media/UMediaCore_FFmpeg.pas index daa3bd92..6abfb16d 100644 --- a/src/media/UMediaCore_FFmpeg.pas +++ b/src/media/UMediaCore_FFmpeg.pas @@ -200,7 +200,7 @@ begin CheckVersions(); - {$IF LIBAVFORMAT_VERSION < 52110000} // 52.110.0 + {$IF LIBAVFORMAT_VERSION <= 52111000} // 52.110.0 av_register_protocol(@UTF8FileProtocol); {$ELSE} av_register_protocol2(@UTF8FileProtocol, sizeof(UTF8FileProtocol)); @@ -267,7 +267,7 @@ begin for i := 0 to FormatCtx.nb_streams-1 do begin -{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 +{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0 Stream := FormatCtx.streams[i]; {$ELSE} Stream := Pointer(FormatCtx.streams^) + i; @@ -317,7 +317,7 @@ begin for i := 0 to FormatCtx^.nb_streams-1 do begin -{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 +{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0 Stream := FormatCtx^.streams[i]; {$ELSE} Stream := Pointer(FormatCtx^.streams^) + i; @@ -375,9 +375,9 @@ begin FilePath := Path(filename); - if ((flags and URL_RDWR) <> 0) then + if ((flags and URL_RDWR) = URL_RDWR) then Mode := fmCreate - else if ((flags and URL_WRONLY) <> 0) then + else if ((flags and URL_WRONLY) = URL_WRONLY) then Mode := fmCreate // TODO: fmCreate is Read+Write -> reopen with fmOpenWrite else Mode := fmOpenRead or fmShareDenyWrite; diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas index 339c441d..fe043504 100644 --- a/src/media/UVideo.pas +++ b/src/media/UVideo.pas @@ -347,7 +347,7 @@ begin Exit; end; -{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 +{$IF LIBAVFORMAT_VERSION <= 52111000} // <= 52.111.0 fStream := fFormatContext^.streams[fStreamIndex]; {$ELSE} fStream := Pointer(fFormatContext^.streams^) + fStreamIndex; -- cgit v1.2.3