[vlc-commits] [Git][videolan/vlc][master] android: catch one more exception in DynamicsProcessing
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Apr 11 08:40:31 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
62fdc8ec by Thomas Guillem at 2024-04-11T08:19:37+00:00
android: catch one more exception in DynamicsProcessing
The following exception is happening on Samsung S23, Android 14 (even
if this method is not documented to throw exceptions).
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] JNI DETECTED ERROR IN APPLICATION: JNI CallIntMethod called with pending exception java.lang.UnsupportedOperationException: AudioEffect: invalid parameter operation
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] at void android.media.audiofx.AudioEffect.checkStatus(int) (AudioEffect.java:1452)
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] at void android.media.audiofx.DynamicsProcessing.setTwoFloat(int, int, float) (DynamicsProcessing.java:2150)
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] at void android.media.audiofx.DynamicsProcessing.setInputGainbyChannel(int, float) (DynamicsProcessing.java:1790)
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] at void android.media.audiofx.DynamicsProcessing.setInputGainAllChannelsTo(float) (DynamicsProcessing.java:1794)
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] at int org.videolan.libvlc.MediaPlayer.setVolume(int) (MediaPlayer.java:-2)
04-07 12:19:34.914 27362 27362 F eolan.vlc.debug: java_vm_ext.cc:591] at int org.videolan.vlc.media.PlayerController.setVolume(int) (PlayerController.kt:300)
Fixes vlc-android#3057
- - - - -
1 changed file:
- modules/audio_output/android/dynamicsprocessing_jni.c
Changes:
=====================================
modules/audio_output/android/dynamicsprocessing_jni.c
=====================================
@@ -191,8 +191,10 @@ int
float dB = volume == 0.0f ? -144 : 20.0f * log10f( volume );
JNI_CALL_VOID( dp, jfields.DynamicsProcessing.setInputGainAllChannelsTo, dB );
- int ret = JNI_CALL_INT( dp, jfields.DynamicsProcessing.setEnabled, volume != 1.0f );
+ if( CHECK_EXCEPTION( "DynamicsProcessing", "setInputGainAllChannelsTo" ) )
+ return VLC_EGENERIC;
+ int ret = JNI_CALL_INT( dp, jfields.DynamicsProcessing.setEnabled, volume != 1.0f );
if( CHECK_EXCEPTION( "DynamicsProcessing", "setEnabled" ) || ret != 0 )
return VLC_EGENERIC;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/62fdc8ec2cb2549e5fb215f43373bc09bcd354cc
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/62fdc8ec2cb2549e5fb215f43373bc09bcd354cc
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list