[Android] Fix crash when dav1d thread number is empty

Nicolas Pomepuy git at videolan.org
Wed Jun 19 07:33:10 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jun 19 09:24:58 2024 +0200| [c96fe2c8e3decff63e278dbe1078047464efa8e0] | committer: Nicolas Pomepuy

Fix crash when dav1d thread number is empty

> https://code.videolan.org/videolan/vlc-android/commit/c96fe2c8e3decff63e278dbe1078047464efa8e0
---

 application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 52f199d32e..661abab9a5 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -532,7 +532,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
                  media.addOption(":http-user-agent=$it")
             }
             val dav1dThreadNumber = settings.getString(DAV1D_THREAD_NUMBER, "") ?: ""
-            if (dav1dThreadNumber.toInt() >= 1) {
+            if (dav1dThreadNumber.isNotEmpty() && dav1dThreadNumber.toInt() >= 1) {
                 media.addOption(":dav1d-thread-frames=$dav1dThreadNumber")
             }
             //todo in VLC 4.0, this should be done by using libvlc_media_player_set_time instead of start-time



More information about the Android mailing list