File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ void AudioDecoder::setupDecoder(const ProfileLoader::Profile& profile)
78
78
bool AudioDecoder::decodeNextFrame (Frame& frameBuffer)
79
79
{
80
80
bool decodeNextFrame = false ;
81
+ const size_t channelLayout = frameBuffer.getAVFrame ().channel_layout ;
81
82
82
83
if (!_isSetup)
83
84
setupDecoder ();
@@ -100,6 +101,9 @@ bool AudioDecoder::decodeNextFrame(Frame& frameBuffer)
100
101
throw std::runtime_error (" An error occurred during audio decoding: " + getDescriptionFromErrorCode (ret));
101
102
}
102
103
104
+ // fixed channel layout value after decoding
105
+ frameBuffer.getAVFrame ().channel_layout = channelLayout;
106
+
103
107
// if no frame could be decompressed
104
108
if (!nextPacketRead && ret == 0 && got_frame == 0 )
105
109
decodeNextFrame = false ;
You can’t perform that action at this time.
0 commit comments