aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlotanrm <lotanrm@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-07-11 09:29:14 +0000
committerlotanrm <lotanrm@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-07-11 09:29:14 +0000
commitea12deb3248317b79ab12c056a00b69382e35e73 (patch)
tree73a756920472f4ba02bca9b22f83042158c60450 /src
parentbd2ba8c9437c0c3bd4e84841f322501166145a6a (diff)
downloadusdx-ea12deb3248317b79ab12c056a00b69382e35e73.tar.gz
usdx-ea12deb3248317b79ab12c056a00b69382e35e73.tar.xz
usdx-ea12deb3248317b79ab12c056a00b69382e35e73.zip
Added compilation condition to new UMediaCore_FFmpeg functions to make earlier builds work again.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2999 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/media/UMediaCore_FFmpeg.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/media/UMediaCore_FFmpeg.pas b/src/media/UMediaCore_FFmpeg.pas
index d006e0d1..1b794c7e 100644
--- a/src/media/UMediaCore_FFmpeg.pas
+++ b/src/media/UMediaCore_FFmpeg.pas
@@ -512,20 +512,26 @@ var
h: Pointer;
buffer: Pointer;
begin
+ {$IF LIBAVFORMAT_VERSION >= 54029104}
ps^ := avformat_alloc_context();
buffer := av_malloc(BLOCKSIZE);
FFmpegStreamOpen(h, filename, URL_RDONLY);
ps^^.pb := avio_alloc_context(buffer, BLOCKSIZE, 0, h, FFmpegStreamRead, FFmpegStreamWrite, FFmpegStreamSeek);
Result := avformat_open_input(ps, filename, nil, nil);
+ {$ELSE}
+ Result := 0;
+ {$ENDIF}
end;
procedure TMediaCore_FFmpeg.AVFormatCloseInput(ps: PPAVFormatContext);
begin
+ {$IF LIBAVFORMAT_VERSION >= 54029104}
av_free(ps^^.pb.buffer);
FFmpegStreamClose(ps^^.pb.opaque);
{ avformat_close_input frees AVIOContext pb, no avio_close needed }
{ avformat_close_input frees AVFormatContext, no additional avformat_free_context needed }
avformat_close_input(ps);
+ {$ENDIF}
end;
{ TPacketQueue }