Skip to content

Commit

Permalink
Correct parmeters to write_audio and write_video
Browse files Browse the repository at this point in the history
Fix for issue ant-media#81
  • Loading branch information
vavadhani committed Aug 9, 2019
1 parent 18f1085 commit 2917174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtmp-client/src/main/cpp/rtmpmuxer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 2917174

Please sign in to comment.