Commit b03ed78a authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

aout: audiotrack: setup DTS_HD output only when needed

(cherry picked from commit 926e1220)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent d7b2ea4f
......@@ -928,7 +928,8 @@ AudioTrack_HasEncoding( audio_output_t *p_aout, vlc_fourcc_t i_format,
switch( i_format )
{
case VLC_CODEC_DTS:
if( MATCH_ENCODING_FLAG( ENCODING_DTS_HD ) )
if( MATCH_ENCODING_FLAG( ENCODING_DTS_HD )
&& var_GetBool( p_aout, "dtshd" ) )
{
*p_dtshd = true;
return true;
......@@ -971,14 +972,13 @@ StartPassthrough( JNIEnv *env, audio_output_t *p_aout )
p_sys->fmt.i_physical_channels = AOUT_CHANS_7_1;
break;
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;
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment