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 7a95737c9ab17c0353fb7fc5c0fff25f998bc8ad..8e259051d548590a660c8e575b1fa940bd16a120 100644 |
--- a/webrtc/api/java/jni/peerconnection_jni.cc |
+++ b/webrtc/api/java/jni/peerconnection_jni.cc |
@@ -851,7 +851,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; |