fix reported input channel order
PATCH 1/1 fix reported input channel order
From: Tom Yan <[email protected]>
a52 plugin expects the input to be in ALSA order and remaps it to general order when encoding. However it reports that the input it takes should be in general order.
This fix should make programs (e.g. mpv) that is aware of channel layout reported by ALSA remap sources appropriately before sending when necessary.
It should not cause any regression to programs (e.g. mplayer) that does not check the reported channel layout (hence not affected by the issue) and remaps sources anyway.
a52/pcm_a52.c +1 -1
@@ -663,8 +663,8 @@ static unsigned int chmap4[4] = { };static unsigned int chmap6[6 ] = {SND_CHMAP_FL ,SND_CHMAP_FR , -SND_CHMAP_FC ,SND_CHMAP_LFE ,SND_CHMAP_RL ,SND_CHMAP_RR , +SND_CHMAP_FC ,SND_CHMAP_LFE , }; static snd_pcm_chmap_query_t **a52_query_chmaps(snd_pcm_ioplug_t *io ATTRIBUTE_UNUSED)
Signature · 1 line
2.7.0
Quoted 10 lines · On Tue, 12 Jan 2016 08:57:39 +0100, [email protected] wrote:
From: Tom Yan <[email protected]>
a52 plugin expects the input to be in ALSA order and remaps it to general order when encoding. However it reports that the input it takes should be in general order.
This fix should make programs (e.g. mpv) that is aware of channel layout reported by ALSA remap sources appropriately before sending when necessary.
It should not cause any regression to programs (e.g. mplayer) that does not check the reported channel layout (hence not affected by the issue) and remaps sources anyway.
Signed-off-by Tom Yan <[email protected]>
Applied now, thanks.
Takashi
Quoted 18 lines
a52/pcm_a52.c +1
-1@@ -663,8 +663,8 @@ static unsigned int chmap4[4] = { };static unsigned int chmap6[6 ] = {SND_CHMAP_FL ,SND_CHMAP_FR , -SND_CHMAP_FC ,SND_CHMAP_LFE ,SND_CHMAP_RL ,SND_CHMAP_RR , +SND_CHMAP_FC ,SND_CHMAP_LFE , }; static snd_pcm_chmap_query_t **a52_query_chmaps(snd_pcm_ioplug_t *io ATTRIBUTE_UNUSED)Signature · 1 line
2.7.0