From 89ac41a2ccb85d6dfccb501ff4877231cab72094 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 5 Feb 2008 13:43:38 +0000 Subject: Update of the ffmpeg headers to their current trunk versions. IMPORTANT: parameter of av_free_packet is a pointer now procedure av_free_packet (pkt: PAVPacket); as it is with av_free() and av_freep() git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@814 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UAudioDecoder_FFMpeg.pas | 11 ++++++----- Game/Code/Classes/UVideo.pas | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UAudioDecoder_FFMpeg.pas b/Game/Code/Classes/UAudioDecoder_FFMpeg.pas index 4cd6ec37..c705d603 100644 --- a/Game/Code/Classes/UAudioDecoder_FFMpeg.pas +++ b/Game/Code/Classes/UAudioDecoder_FFMpeg.pas @@ -45,7 +45,8 @@ uses {$ENDIF} UIni, UMain, - UThemes; + UThemes, + UConfig; type @@ -334,7 +335,7 @@ begin if(av_read_frame(stream.pFormatCtx, packet) < 0) then begin // check for end-of-file (eof is not an error) - {$IF (LIBAVFORMAT_MAJOR_VERSION >= 52)} + {$IF (LIBAVFORMAT_VERSION_MAJOR >= 52)} pbIOCtx := stream.pFormatCtx^.pb; {$ELSE} pbIOCtx := @stream.pFormatCtx^.pb; @@ -370,7 +371,7 @@ begin end else begin - av_free_packet(packet); + av_free_packet(@packet); end; end; @@ -428,7 +429,7 @@ begin if (pkt.data <> nil) then begin - av_free_packet(pkt); + av_free_packet(@pkt); end; if (packetQueue.quit) then @@ -739,7 +740,7 @@ begin while(pkt <> nil) do begin pkt1 := pkt^.next; - av_free_packet(pkt^.pkt); + av_free_packet(@pkt^.pkt); av_freep(pkt); pkt := pkt1; end; diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas index c30b271e..db7e3ffd 100644 --- a/Game/Code/Classes/UVideo.pas +++ b/Game/Code/Classes/UVideo.pas @@ -286,7 +286,7 @@ begin try // if AVPacket.data <> nil then - av_free_packet( AVPacket ); // JB-ffmpeg + av_free_packet( @AVPacket ); // JB-ffmpeg except // TODO : JB_FFMpeg ... why does this now AV sometimes ( or always !! ) end; @@ -308,7 +308,7 @@ begin // release internal packet structure created by av_read_frame try // if AVPacket.data <> nil then - av_free_packet( AVPacket ); // JB-ffmpeg + av_free_packet( @AVPacket ); // JB-ffmpeg except // TODO : JB_FFMpeg ... why does this now AV sometimes ( or always !! ) end; -- cgit v1.2.3