diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 12:34:07 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 12:34:07 +0000 |
commit | 94cefdb78044e0f9996e3032de34b690de98b708 (patch) | |
tree | b858a502ed5f12a02e18c2299e045eb0a757a8b7 /unicode/src/media/UAudioDecoder_FFmpeg.pas | |
parent | d1538b5a15a47b54a53e42d1cc7117780ffafd43 (diff) | |
download | usdx-94cefdb78044e0f9996e3032de34b690de98b708.tar.gz usdx-94cefdb78044e0f9996e3032de34b690de98b708.tar.xz usdx-94cefdb78044e0f9996e3032de34b690de98b708.zip |
- revert to 1777
- Ocean.ini and SVN properties are not reverted
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1854 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | unicode/src/media/UAudioDecoder_FFmpeg.pas | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/unicode/src/media/UAudioDecoder_FFmpeg.pas b/unicode/src/media/UAudioDecoder_FFmpeg.pas index 97d8a8df..2d221f40 100644 --- a/unicode/src/media/UAudioDecoder_FFmpeg.pas +++ b/unicode/src/media/UAudioDecoder_FFmpeg.pas @@ -378,14 +378,14 @@ begin // try standard format SampleFormat := asfS16; end; - if CodecCtx^.channels > 255 then - Log.LogStatus('Error: CodecCtx^.channels > 255', 'TFFmpegDecodeStream.Open'); + FormatInfo := TAudioFormatInfo.Create( - byte(CodecCtx^.channels), + CodecCtx^.channels, CodecCtx^.sample_rate, SampleFormat ); + PacketQueue := TPacketQueue.Create(); // finally start the decode thread @@ -446,9 +446,7 @@ end; function TFFmpegDecodeStream.GetLength(): real; begin - // do not forget to consider the start_time value here - // there is a type size mismatch warnign because start_time and duration are cint64. - // So, in principle there could be an overflow when doing the sum. + // do not forget to consider the start_time value here Result := (FormatCtx^.start_time + FormatCtx^.duration) / AV_TIME_BASE; end; @@ -645,6 +643,7 @@ end; function TFFmpegDecodeStream.ParseLoop(): boolean; var Packet: TAVPacket; + StatusPacket: PAVPacket; SeekTarget: int64; ByteIOCtx: PByteIOContext; ErrorCode: integer; |