From 5d576ba99a2495e9680fb283ab0cfccbcbe701f4 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Tue, 9 Aug 2022 22:30:31 -0500 Subject: [PATCH] Fix deprecation warning from new ffmpeg (#416) Closes #415 Signed-off-by: Michael Carroll --- av/src/AudioDecoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/av/src/AudioDecoder.cc b/av/src/AudioDecoder.cc index 4a99a0912..64f99d13a 100644 --- a/av/src/AudioDecoder.cc +++ b/av/src/AudioDecoder.cc @@ -149,7 +149,7 @@ bool AudioDecoder::Decode(uint8_t **_outBuffer, unsigned int *_outBufferSize) // decodedFrame->linesize[0]. int size = decodedFrame->nb_samples * av_get_bytes_per_sample(this->dataPtr->codecCtx->sample_fmt) * - this->dataPtr->codecCtx->channels; + this->dataPtr->codecCtx->ch_layout.nb_channels; // Resize the audio buffer as necessary if (*_outBufferSize + size > maxBufferSize)