We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5c1db1 commit 1cdebe6Copy full SHA for 1cdebe6
src/AvTranscoder/InputStreamAudio.cpp
@@ -137,10 +137,12 @@ bool InputStreamAudio::readNextFrame( AudioFrame& audioFrameBuffer )
137
if( audioFrameBuffer.getSize() != decodedSize )
138
audioFrameBuffer.getBuffer().resize( decodedSize );
139
140
+ int nb_channels = av_get_channel_layout_nb_channels( *m_codecContext->codec->channel_layouts );
141
+
142
unsigned char* dest = audioFrameBuffer.getPtr();
143
av_samples_fill_arrays(&dest, m_frame->linesize,
144
m_frame->data[0],
- m_frame->channels, m_frame->nb_samples,
145
+ nb_channels, m_frame->nb_samples,
146
m_codecContext->sample_fmt, 1);
147
}
148
0 commit comments