diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-10-12 19:05:46 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-10-12 19:05:46 +0400 |
commit | 60ada2873a25ceaf37f522ab271d52013fcbf902 (patch) | |
tree | f43ec70693ccb1b6a40c032bdb0cf93cf1816e03 /decoder/LAVAudio | |
parent | b7299b3f2a90fb238eec54b8a38f28c9fa57391d (diff) |
Set default channel mask for stereo/mono properly
Diffstat (limited to 'decoder/LAVAudio')
-rw-r--r-- | decoder/LAVAudio/PostProcessor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder/LAVAudio/PostProcessor.cpp b/decoder/LAVAudio/PostProcessor.cpp index cb20b8fd..1b9215d3 100644 --- a/decoder/LAVAudio/PostProcessor.cpp +++ b/decoder/LAVAudio/PostProcessor.cpp @@ -683,6 +683,9 @@ HRESULT CLAVAudio::PostProcess(BufferDetails *buffer) // Validate channel mask if (!buffer->dwChannelMask || layout_channels != buffer->wChannels) { buffer->dwChannelMask = get_channel_mask(buffer->wChannels); + if (!buffer->dwChannelMask && buffer->wChannels <= 2) { + buffer->dwChannelMask = buffer->wChannels == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + } } if (m_settings.MixingEnabled || m_dwOverrideMixer) { |