Skip to content

Commit 69604e5

Browse files
author
Clement Champetier
committed
AudioGenerator: removed check of channel layout when decode next frame
This code was never reach, since the previous intructions already check if the frame is a valid audio frame.
1 parent 0746921 commit 69604e5

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/AvTranscoder/decoder/AudioGenerator.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@ bool AudioGenerator::decodeNextFrame(Frame& frameBuffer)
2929
static_cast<AudioFrame&>(frameBuffer).allocateAVSample(_frameDesc);
3030
}
3131

32-
// Check channel layout of the given frame to be able to copy audio data to it.
33-
// @see Frame.copyData method
34-
if(frameBuffer.getAVFrame().channel_layout == 0)
35-
{
36-
const size_t channelLayout = av_get_default_channel_layout(frameBuffer.getAVFrame().channels);
37-
LOG_WARN("Channel layout en the audio frame is not set. Set it to '" << channelLayout
38-
<< "' to be able to copy silence data.")
39-
av_frame_set_channel_layout(&frameBuffer.getAVFrame(), channelLayout);
40-
}
41-
4232
// Generate silent
4333
if(!_inputFrame)
4434
{

0 commit comments

Comments
 (0)