[vlc-commits] audiotrack: also check device capabilities for API 23

Thomas Guillem git at videolan.org
Fri Jun 7 11:01:16 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun  7 10:58:41 2019 +0200| [dca2bfceb88b8628abcfb5ffc7785dcd9fd5f369] | committer: Thomas Guillem

audiotrack: also check device capabilities for API 23

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

 modules/audio_output/audiotrack.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 3c776ecddc..a5351c80e5 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -1112,11 +1112,12 @@ StartPassthrough( JNIEnv *env, audio_output_t *p_aout )
     aout_sys_t *p_sys = p_aout->sys;
     int i_at_format;
 
+    bool b_dtshd;
+    if( !AudioTrack_HasEncoding( p_aout, p_sys->fmt.i_format, &b_dtshd ) )
+        return VLC_EGENERIC;
+
     if( jfields.AudioFormat.has_ENCODING_IEC61937 )
     {
-        bool b_dtshd;
-        if( !AudioTrack_HasEncoding( p_aout, p_sys->fmt.i_format, &b_dtshd ) )
-            return VLC_EGENERIC;
         i_at_format = jfields.AudioFormat.ENCODING_IEC61937;
         switch( p_sys->fmt.i_format )
         {



More information about the vlc-commits mailing list