Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: webrtc/api/java/jni/peerconnection_jni.cc

Issue 1853523002: Allowing a Java object field to be null in a new JNI helper method. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding comment around maxBitrateBps explaining null value. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 cf3ddebde96c49b22b736a38b38e949a9175d6c2..e79337d0aa232184613b98b022292fedb2cefd7a 100644
--- a/webrtc/api/java/jni/peerconnection_jni.cc
+++ b/webrtc/api/java/jni/peerconnection_jni.cc
@@ -2042,7 +2042,8 @@ static bool JavaEncodingToJsepRtpEncodingParameters(
for (jobject j_encoding_parameters : Iterable(jni, j_encodings)) {
webrtc::RtpEncodingParameters encoding;
encoding.active = GetBooleanField(jni, j_encoding_parameters, active_id);
- jobject j_bitrate = GetObjectField(jni, j_encoding_parameters, bitrate_id);
+ jobject j_bitrate =
+ GetNullableObjectField(jni, j_encoding_parameters, bitrate_id);
if (!IsNull(jni, j_bitrate)) {
int bitrate_value = jni->CallIntMethod(j_bitrate, int_value_id);
CHECK_EXCEPTION(jni) << "error during CallIntMethod";

Powered by Google App Engine
This is Rietveld 408576698