[vlc-commits] aout: audiotrack: setup DTS_HD output only when needed
Thomas Guillem
git at videolan.org
Thu Dec 21 10:53:12 CET 2017
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec 20 14:10:01 2017 +0100| [b03ed78ad3d4e39d0446e72984e944a3c38d1fbe] | committer: Jean-Baptiste Kempf
aout: audiotrack: setup DTS_HD output only when needed
(cherry picked from commit 926e12200ee56baafd6e7c49732cc4f8dd988ed0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b03ed78ad3d4e39d0446e72984e944a3c38d1fbe
---
modules/audio_output/audiotrack.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 7f0b47ddfd..bacc3fc1b2 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -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;
More information about the vlc-commits
mailing list