mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix ALAC playback
This commit is contained in:
parent
cb8651b003
commit
b529625219
@ -368,6 +368,11 @@ static av_cold int ffat_create_decoder(AVCodecContext *avctx, AVPacket *pkt)
|
|||||||
avctx->sample_rate = out_format.mSampleRate = in_format.mSampleRate;
|
avctx->sample_rate = out_format.mSampleRate = in_format.mSampleRate;
|
||||||
avctx->channels = out_format.mChannelsPerFrame = in_format.mChannelsPerFrame;
|
avctx->channels = out_format.mChannelsPerFrame = in_format.mChannelsPerFrame;
|
||||||
|
|
||||||
|
out_format.mBytesPerFrame =
|
||||||
|
out_format.mChannelsPerFrame * (out_format.mBitsPerChannel / 8);
|
||||||
|
out_format.mBytesPerPacket =
|
||||||
|
out_format.mBytesPerFrame * out_format.mFramesPerPacket;
|
||||||
|
|
||||||
if (avctx->codec_id == AV_CODEC_ID_ADPCM_IMA_QT)
|
if (avctx->codec_id == AV_CODEC_ID_ADPCM_IMA_QT)
|
||||||
in_format.mFramesPerPacket = 64;
|
in_format.mFramesPerPacket = 64;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user