[vlc-commits] aout: audiotrack: setup DTS_HD output only when needed

Thomas Guillem git at videolan.org
Wed Dec 20 19:14:25 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec 20 14:10:01 2017 +0100| [926e12200ee56baafd6e7c49732cc4f8dd988ed0] | committer: Thomas Guillem

aout: audiotrack: setup DTS_HD output only when needed

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=926e12200ee56baafd6e7c49732cc4f8dd988ed0
---

 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