From 9434240f7e08b34567b1ac49ced329f7d5ebfdfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Fri, 20 Oct 2017 12:54:04 +0200 Subject: [PATCH] Fix a crash in AppRTCMobile when videoCodec is set to null. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit peerConnectionParameters.videoCodec can be null in some cases. Previously, this would cause a crash in AppRTCMobile. Bug: b/67938523 Change-Id: I30ebf0f91fad23a3cf34946736b9f4e6c266277f Reviewed-on: https://webrtc-review.googlesource.com/14200 Reviewed-by: Magnus Jedvert Commit-Queue: Sami Kalliomäki Cr-Commit-Position: refs/heads/master@{#20372} --- .../androidapp/src/org/appspot/apprtc/PeerConnectionClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java index a9b71e6446..f2055927a3 100644 --- a/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java +++ b/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java @@ -516,7 +516,7 @@ public class PeerConnectionClient { Log.d(TAG, "Factory networkIgnoreMask option: " + options.networkIgnoreMask); } final boolean enableH264HighProfile = - peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_H264_HIGH); + VIDEO_CODEC_H264_HIGH.equals(peerConnectionParameters.videoCodec); factory = new PeerConnectionFactory(options, new HardwareVideoEncoderFactory(rootEglBase.getEglBaseContext(), true /* enableIntelVp8Encoder */, enableH264HighProfile),