[Android] jni: mediaplayer: fix v4 build
Martin Finkel
git at videolan.org
Tue Feb 8 09:47:15 UTC 2022
vlc-android | branch: master | Martin Finkel <me at martinfinkel.com> | Mon Feb 7 15:29:48 2022 +0700| [9cee608b4f1f0a332222e6aeadce5df68cb32f47] | committer: Nicolas Pomepuy
jni: mediaplayer: fix v4 build
> https://code.videolan.org/videolan/vlc-android/commit/9cee608b4f1f0a332222e6aeadce5df68cb32f47
---
libvlc/jni/libvlcjni-mediaplayer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libvlc/jni/libvlcjni-mediaplayer.c b/libvlc/jni/libvlcjni-mediaplayer.c
index 9c678024a..ae87598ff 100644
--- a/libvlc/jni/libvlcjni-mediaplayer.c
+++ b/libvlc/jni/libvlcjni-mediaplayer.c
@@ -600,7 +600,11 @@ Java_org_videolan_libvlc_MediaPlayer_nativeSetAudioOutputDevice(JNIEnv *env,
return false;
}
+#if defined(LIBVLC_VERSION_MAJOR) && LIBVLC_VERSION_MAJOR >= 4
+ libvlc_audio_output_device_set(p_obj->u.p_mp, psz_id);
+#else
libvlc_audio_output_device_set(p_obj->u.p_mp, NULL, psz_id);
+#endif
(*env)->ReleaseStringUTFChars(env, jid, psz_id);
return true;
}
More information about the Android
mailing list