[vlc-commits] audiotrack: don't fallback if ac3/dts fails
Thomas Guillem
git at videolan.org
Fri Oct 7 18:59:39 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Oct 7 15:30:40 2016 +0200| [9603f0bb60b8c030dcbd44ac525120195b245535] | committer: Thomas Guillem
audiotrack: don't fallback if ac3/dts fails
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9603f0bb60b8c030dcbd44ac525120195b245535
---
modules/audio_output/audiotrack.c | 27 ++++++---------------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 3e46152..c381c79 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -957,16 +957,8 @@ Start( audio_output_t *p_aout, audio_sample_format_t *restrict p_fmt )
p_sys->fmt.i_format = VLC_CODEC_SPDIFB;
i_at_format = jfields.AudioFormat.ENCODING_AC3;
}
- else if( jfields.AudioFormat.has_ENCODING_PCM_FLOAT )
- {
- p_sys->fmt.i_format = VLC_CODEC_FL32;
- i_at_format = jfields.AudioFormat.ENCODING_PCM_FLOAT;
- }
else
- {
- p_sys->fmt.i_format = VLC_CODEC_S16N;
- i_at_format = jfields.AudioFormat.ENCODING_PCM_16BIT;
- }
+ return VLC_EGENERIC;
break;
case VLC_CODEC_DTS:
if( jfields.AudioFormat.has_ENCODING_DTS && b_spdif )
@@ -974,18 +966,12 @@ Start( audio_output_t *p_aout, audio_sample_format_t *restrict p_fmt )
p_sys->fmt.i_format = VLC_CODEC_SPDIFB;
i_at_format = jfields.AudioFormat.ENCODING_DTS;
}
- else if( jfields.AudioFormat.has_ENCODING_PCM_FLOAT )
- {
- p_sys->fmt.i_format = VLC_CODEC_FL32;
- i_at_format = jfields.AudioFormat.ENCODING_PCM_FLOAT;
- }
else
- {
- p_sys->fmt.i_format = VLC_CODEC_S16N;
- i_at_format = jfields.AudioFormat.ENCODING_PCM_16BIT;
- }
+ return VLC_EGENERIC;
break;
default:
+ if( !AOUT_FMT_LINEAR( &p_sys->fmt ) )
+ return VLC_EGENERIC;
p_sys->fmt.i_format = VLC_CODEC_S16N;
i_at_format = jfields.AudioFormat.ENCODING_PCM_16BIT;
break;
@@ -1025,9 +1011,8 @@ Start( audio_output_t *p_aout, audio_sample_format_t *restrict p_fmt )
{
if( p_sys->fmt.i_format == VLC_CODEC_SPDIFB )
{
- msg_Warn( p_aout, "SPDIF configuration failed, "
- "fallback to PCM" );
- p_sys->fmt.i_format = VLC_CODEC_FL32;
+ msg_Warn( p_aout, "SPDIF configuration failed" );
+ return VLC_EGENERIC;
}
else if( p_sys->fmt.i_format == VLC_CODEC_FL32 )
{
More information about the vlc-commits
mailing list