diff options
author | lotanrm <lotanrm@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2012-05-17 23:05:25 +0000 |
---|---|---|
committer | lotanrm <lotanrm@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2012-05-17 23:05:25 +0000 |
commit | 7d523b59769a7a99afdfe365ced3c6727018cf5a (patch) | |
tree | b8c084ae0e6e809723c15db7d8bf0f2fb8531b27 /src/media/UMediaCore_FFmpeg.pas | |
parent | c03bb84ce50794bab234b1c5cbfa74f6e8e3c6f2 (diff) | |
download | usdx-7d523b59769a7a99afdfe365ced3c6727018cf5a.tar.gz usdx-7d523b59769a7a99afdfe365ced3c6727018cf5a.tar.xz usdx-7d523b59769a7a99afdfe365ced3c6727018cf5a.zip |
Corrected AVStream pointer arithmetic to work inconjuction with fpc 2.6 as well fpc 2.4. Removed unneeded code.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2884 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | src/media/UMediaCore_FFmpeg.pas | 4 |
1 files changed, 2 insertions, 2 deletions
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 |