aboutsummaryrefslogtreecommitdiffstats
path: root/src/media/UMediaCore_FFmpeg.pas
diff options
context:
space:
mode:
authorlotanrm <lotanrm@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-05-17 23:05:25 +0000
committerlotanrm <lotanrm@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-05-17 23:05:25 +0000
commit7d523b59769a7a99afdfe365ced3c6727018cf5a (patch)
treeb8c084ae0e6e809723c15db7d8bf0f2fb8531b27 /src/media/UMediaCore_FFmpeg.pas
parentc03bb84ce50794bab234b1c5cbfa74f6e8e3c6f2 (diff)
downloadusdx-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.pas4
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