From 17119fa5123a74c2cd371870e6450ddcd025fbdf Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sat, 5 May 2012 20:48:01 +0000 Subject: update for ffmpeg-0.8 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2873 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UMediaCore_FFmpeg.pas | 8 ++++++++ src/media/UVideo.pas | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/media/UMediaCore_FFmpeg.pas b/src/media/UMediaCore_FFmpeg.pas index ffc7b1c5..865c9fa9 100644 --- a/src/media/UMediaCore_FFmpeg.pas +++ b/src/media/UMediaCore_FFmpeg.pas @@ -266,7 +266,11 @@ begin for i := 0 to FormatCtx.nb_streams-1 do begin +{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 Stream := FormatCtx.streams[i]; +{$ELSE} + Stream := Pointer(FormatCtx.streams^) + i; +{$IFEND} {$IF LIBAVCODEC_VERSION < 52064000} // < 52.64.0 if (Stream.codec.codec_type = CODEC_TYPE_VIDEO) and @@ -312,7 +316,11 @@ begin for i := 0 to FormatCtx^.nb_streams-1 do begin +{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 Stream := FormatCtx^.streams[i]; +{$ELSE} + Stream := Pointer(FormatCtx^.streams^) + i; +{$IFEND} {$IF LIBAVCODEC_VERSION < 52064000} // < 52.64.0 if (Stream.codec^.codec_type = CODEC_TYPE_AUDIO) then diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas index b3030b0c..339c441d 100644 --- a/src/media/UVideo.pas +++ b/src/media/UVideo.pas @@ -347,7 +347,11 @@ begin Exit; end; +{$IF LIBAVFORMAT_VERSION < 52110000} // < 52.110.0 fStream := fFormatContext^.streams[fStreamIndex]; +{$ELSE} + fStream := Pointer(fFormatContext^.streams^) + fStreamIndex; +{$IFEND} fCodecContext := fStream^.codec; fCodec := avcodec_find_decoder(fCodecContext^.codec_id); -- cgit v1.2.3