[FFmpeg-cvslog] jni: Return ENOSYS on unsupported platforms

Timothy Gu git at videolan.org
Wed Aug 3 08:33:11 EEST 2016


ffmpeg | branch: release/3.1 | Timothy Gu <timothygu99 at gmail.com> | Tue Aug  2 20:47:55 2016 -0700| [327033d913f782c25a585115a0135842ef8aa5e0] | committer: Timothy Gu

jni: Return ENOSYS on unsupported platforms

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=327033d913f782c25a585115a0135842ef8aa5e0
---

 libavcodec/jni.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavcodec/jni.c b/libavcodec/jni.c
index 32456f5..85dcf2a 100644
--- a/libavcodec/jni.c
+++ b/libavcodec/jni.c
@@ -20,19 +20,18 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 
-#include "config.h"
+#include "libavutil/error.h"
 #include "jni.h"
 
 #if CONFIG_JNI
-
-#include <errno.h>
 #include <jni.h>
 #include <pthread.h>
 
 #include "libavutil/log.h"
-#include "libavutil/error.h"
 #include "ffjni.h"
 
 void *java_vm;
@@ -69,7 +68,7 @@ void *av_jni_get_java_vm(void *log_ctx)
 
 int av_jni_set_java_vm(void *vm, void *log_ctx)
 {
-    return 0;
+    return AVERROR(ENOSYS);
 }
 
 void *av_jni_get_java_vm(void *log_ctx)



More information about the ffmpeg-cvslog mailing list