Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-10-12 19:05:46 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-10-12 19:05:46 +0400
commit60ada2873a25ceaf37f522ab271d52013fcbf902 (patch)
treef43ec70693ccb1b6a40c032bdb0cf93cf1816e03 /decoder/LAVAudio
parentb7299b3f2a90fb238eec54b8a38f28c9fa57391d (diff)
Set default channel mask for stereo/mono properly
Diffstat (limited to 'decoder/LAVAudio')
-rw-r--r--decoder/LAVAudio/PostProcessor.cpp3
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) {