[vlc-commits] opensles: fix build with last typedef *_sys_t changes

Thomas Guillem git at videolan.org
Sat May 5 11:12:43 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat May  5 11:08:34 2018 +0200| [3231dd50b91c0007af214909bcf9f245693b80f4] | committer: Thomas Guillem

opensles: fix build with last typedef *_sys_t changes

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

 modules/audio_output/opensles_android.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index a9d451263d..f3ee62da5c 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -205,7 +205,8 @@ static void Flush(audio_output_t *aout, bool drain)
 
 static int VolumeSet(audio_output_t *aout, float vol)
 {
-    if (!aout->sys->volumeItf)
+    aout_sys_t *sys = aout->sys;
+    if (!sys->volumeItf)
         return -1;
 
     /* Convert UI volume to linear factor (cube) */
@@ -218,16 +219,17 @@ static int VolumeSet(audio_output_t *aout, float vol)
     else if (mb > 0)
         mb = 0; /* maximum supported level could be higher: GetMaxVolumeLevel */
 
-    SLresult r = SetVolumeLevel(aout->sys->volumeItf, mb);
+    SLresult r = SetVolumeLevel(sys->volumeItf, mb);
     return (r == SL_RESULT_SUCCESS) ? 0 : -1;
 }
 
 static int MuteSet(audio_output_t *aout, bool mute)
 {
-    if (!aout->sys->volumeItf)
+    aout_sys_t *sys = aout->sys;
+    if (!sys->volumeItf)
         return -1;
 
-    SLresult r = SetMute(aout->sys->volumeItf, mute);
+    SLresult r = SetMute(sys->volumeItf, mute);
     return (r == SL_RESULT_SUCCESS) ? 0 : -1;
 }
 



More information about the vlc-commits mailing list