From 29171747fd85184f17bd84f07bdd26675a6f9539 Mon Sep 17 00:00:00 2001 From: "Venkatarama NG. Avadhani" Date: Thu, 8 Aug 2019 21:49:59 +0530 Subject: [PATCH] Correct parmeters to write_audio and write_video Fix for issue #81 --- rtmp-client/src/main/cpp/rtmpmuxer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtmp-client/src/main/cpp/rtmpmuxer.c b/rtmp-client/src/main/cpp/rtmpmuxer.c index f6ba6fb..ecda7db 100644 --- a/rtmp-client/src/main/cpp/rtmpmuxer.c +++ b/rtmp-client/src/main/cpp/rtmpmuxer.c @@ -24,7 +24,7 @@ Java_net_butterflytv_rtmp_1client_RTMPMuxer_writeAudio(JNIEnv* env, jobject thiz jint offset, jint length, jlong timestamp) { jbyte *data = (*env)->GetByteArrayElements(env, data_, NULL); - jint result = rtmp_sender_write_audio_frame(data[offset], length, timestamp, 0); + jint result = rtmp_sender_write_audio_frame(&data[offset], length, timestamp, 0); (*env)->ReleaseByteArrayElements(env, data_, data, JNI_ABORT); return result; @@ -35,7 +35,7 @@ Java_net_butterflytv_rtmp_1client_RTMPMuxer_writeVideo(JNIEnv* env, jobject thiz jint offset, jint length, jlong timestamp) { jbyte *data = (*env)->GetByteArrayElements(env, data_, NULL); - jint result = rtmp_sender_write_video_frame(data[offset], length, timestamp, 0, 0); + jint result = rtmp_sender_write_video_frame(&data[offset], length, timestamp, 0, 0); (*env)->ReleaseByteArrayElements(env, data_, data, JNI_ABORT);