Skip to content

Commit

Permalink
Merge pull request #82 from ittiam-systems/bug-81
Browse files Browse the repository at this point in the history
Correct parmeters to write_audio and write_video
  • Loading branch information
mekya authored Aug 9, 2019
2 parents 8273b96 + 2917174 commit f48a7c4
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 f48a7c4

Please sign in to comment.