[vlc-devel] [PATCH 11/13] aout: audiotrack: handle VLC_CODEC_DTSHD
Thomas Guillem
thomas at gllm.fr
Tue Dec 19 12:38:42 CET 2017
---
modules/audio_output/audiotrack.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 7f0b47ddfd..7b189d7749 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -927,12 +927,14 @@ AudioTrack_HasEncoding( audio_output_t *p_aout, vlc_fourcc_t i_format,
*p_dtshd = false;
switch( i_format )
{
- case VLC_CODEC_DTS:
+ case VLC_CODEC_DTSHD:
if( MATCH_ENCODING_FLAG( ENCODING_DTS_HD ) )
{
*p_dtshd = true;
return true;
}
+ /* fallthrough */
+ case VLC_CODEC_DTS:
return MATCH_ENCODING_FLAG( ENCODING_DTS );
case VLC_CODEC_A52:
return MATCH_ENCODING_FLAG( ENCODING_AC3 );
@@ -970,15 +972,16 @@ StartPassthrough( JNIEnv *env, audio_output_t *p_aout )
* apparently */
p_sys->fmt.i_physical_channels = AOUT_CHANS_7_1;
break;
+ case VLC_CODEC_DTSHD:
case VLC_CODEC_DTS:
- if( b_dtshd && p_sys->fmt.i_rate >= 48000 )
+ p_sys->fmt.i_bytes_per_frame = 4;
+ p_sys->fmt.i_physical_channels = AOUT_CHANS_STEREO;
+ /* fallthrough */
+ if( b_dtshd )
{
p_sys->fmt.i_rate = 192000;
p_sys->fmt.i_bytes_per_frame = 16;
}
- else
- p_sys->fmt.i_bytes_per_frame = 4;
- p_sys->fmt.i_physical_channels = AOUT_CHANS_STEREO;
break;
case VLC_CODEC_EAC3:
p_sys->fmt.i_rate = 192000;
--
2.11.0
More information about the vlc-devel
mailing list