Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita66c49d

Browse files
author
Clement Champetier
committed
AudioDecoder: fix the number of channels used to compute the decoded size
No real impact in the process, because we only check that "decodedSize"is not equal to 0. But it is more accurate :)
1 parent3a03cbf commita66c49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/AvTranscoder/decoder/AudioDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ bool AudioDecoder::decodeNextFrame(IFrame& frameBuffer, const std::vector<size_t
153153
if(!decodeNextFrame(allDataOfNextFrame))
154154
returnfalse;
155155

156-
constint dstNbChannels =1;
157156
constsize_t bytePerSample = audioBuffer.getBytesPerSample();
157+
constint dstNbChannels = channelIndexArray.size();
158158
constint noAlignment =0;
159159
constsize_t decodedSize =av_samples_get_buffer_size(NULL, dstNbChannels, frameBuffer.getAVFrame().nb_samples,
160160
avCodecContext.sample_fmt, noAlignment);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp