aboutsummaryrefslogtreecommitdiffstats
path: root/src/media
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-05-24 09:25:20 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-05-24 09:25:20 +0000
commitc24d48070d2c032f89a69a8022cc2dae21f6bb70 (patch)
tree87284f8e02aab0ea1bf9b469c036fd39c85f9dbb /src/media
parent7ef18fe4670390ed1fc80332f145990e6d0edb1e (diff)
downloadusdx-c24d48070d2c032f89a69a8022cc2dae21f6bb70.tar.gz
usdx-c24d48070d2c032f89a69a8022cc2dae21f6bb70.tar.xz
usdx-c24d48070d2c032f89a69a8022cc2dae21f6bb70.zip
some minor bugfixes.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2889 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/media')
-rw-r--r--src/media/UAudioDecoder_FFmpeg.pas8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/media/UAudioDecoder_FFmpeg.pas b/src/media/UAudioDecoder_FFmpeg.pas
index 6db1454d..ccec7090 100644
--- a/src/media/UAudioDecoder_FFmpeg.pas
+++ b/src/media/UAudioDecoder_FFmpeg.pas
@@ -80,7 +80,7 @@ const
const
// TODO: The factor 3/2 might not be necessary as we do not need extra
// space for synchronizing as in the tutorial.
- AUDIO_BUFFER_SIZE = (192000 * 3) div 2;
+ AUDIO_BUFFER_SIZE = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) div 2;
type
TFFmpegDecodeStream = class(TAudioDecodeStream)
@@ -293,7 +293,7 @@ begin
{$IF LIBAVFORMAT_VERSION >= 53001003)}
AVResult := avformat_open_input(@fFormatCtx, PAnsiChar('ufile:'+FileName.ToUTF8), nil, nil);
{$ELSE}
- AVResult := av_open_input_file(fFormatContext, PAnsiChar('ufile:'+FileName.ToUTF8), nil, 0, nil);
+ AVResult := av_open_input_file(fFormatCtx, PAnsiChar('ufile:'+FileName.ToUTF8), nil, 0, nil);
{$IFEND}
if (AVResult <> 0) then
begin
@@ -384,7 +384,7 @@ begin
// fail if called concurrently by different threads.
FFmpegCore.LockAVCodec();
try
- {$IF LIBAVCODEC_VERSION >= 5300500}
+ {$IF LIBAVCODEC_VERSION >= 53005000}
AVResult := avcodec_open2(fCodecCtx, fCodec, nil);
{$ELSE}
AVResult := avcodec_open(fCodecCtx, fCodec);
@@ -916,7 +916,7 @@ begin
FFmpegCore.LockAVCodec();
try
avcodec_close(fCodecCtx);
- {$IF LIBAVCODEC_VERSION >= 5300500}
+ {$IF LIBAVCODEC_VERSION >= 53005000}
avcodec_open2(fCodecCtx, fCodec, nil);
{$ELSE}
avcodec_open(fCodecCtx, fCodec);