Index: webrtc/api/java/jni/peerconnection_jni.cc |
diff --git a/webrtc/api/java/jni/peerconnection_jni.cc b/webrtc/api/java/jni/peerconnection_jni.cc |
index d614ed6c29d12276baa2df3dded8efc0d50f6c1a..6c8192d8c669b73461b019364ca26dabb9a81de2 100644 |
--- a/webrtc/api/java/jni/peerconnection_jni.cc |
+++ b/webrtc/api/java/jni/peerconnection_jni.cc |
@@ -893,7 +893,7 @@ JOW(jboolean, DataChannel_sendNative)(JNIEnv* jni, jobject j_dc, |
jbyteArray data, jboolean binary) { |
jbyte* bytes = jni->GetByteArrayElements(data, NULL); |
bool ret = ExtractNativeDC(jni, j_dc)->Send(DataBuffer( |
- rtc::Buffer(bytes, jni->GetArrayLength(data)), |
+ rtc::CopyOnWriteBuffer(bytes, jni->GetArrayLength(data)), |
binary)); |
jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); |
return ret; |