[vlc-commits] aout: move code
Thomas Guillem
git at videolan.org
Wed Jul 19 18:57:48 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jul 18 16:10:39 2017 +0200| [81e768f82eff17d2cc206e75c53f3ea4a95781a9] | committer: Thomas Guillem
aout: move code
This part is output specific
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=81e768f82eff17d2cc206e75c53f3ea4a95781a9
---
src/audio_output/dec.c | 8 --------
src/audio_output/output.c | 11 ++++++++++-
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 966e4a3248..58ede03c51 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -80,14 +80,6 @@ int aout_DecNew( audio_output_t *p_aout,
atomic_store (&owner->restart, 0);
owner->input_format = *p_format;
owner->mixer_format = owner->input_format;
-
- if (p_format->channel_type == AUDIO_CHANNEL_TYPE_BITMAP
- && i_map_channels == 0)
- {
- /* The output channel map is unknown, use the WAVE one. */
- assert(owner->mixer_format.i_channels > 0);
- aout_SetWavePhysicalChannels(&owner->mixer_format);
- }
owner->request_vout = *p_request_vout;
var_Change (p_aout, "stereo-mode", VLC_VAR_SETVALUE,
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index ec9f68996b..ce9cbe21f1 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -484,7 +484,16 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
* and the ideal audio format would be the output of the filters chain.
* But that scheme would not really play well with digital pass-through. */
if (AOUT_FMT_LINEAR(fmt))
- { /* Try to stay in integer domain if possible for no/slow FPU. */
+ {
+ if (fmt->channel_type == AUDIO_CHANNEL_TYPE_BITMAP
+ && aout_FormatNbChannels(fmt) == 0)
+ {
+ /* The output channel map is unknown, use the WAVE one. */
+ assert(fmt->i_channels > 0);
+ aout_SetWavePhysicalChannels(fmt);
+ }
+
+ /* Try to stay in integer domain if possible for no/slow FPU. */
fmt->i_format = (fmt->i_bitspersample > 16) ? VLC_CODEC_FL32
: VLC_CODEC_S16N;
More information about the vlc-commits
mailing list