Fix AppRTCDemo crash when room is connected after PC is destroyed.

Also move VideoRendererGui.dispose() to the section with public API.

BUG=4909
R=wzh@webrtc.org

Review URL: https://codereview.webrtc.org/1312523004 .

Cr-Commit-Position: refs/heads/master@{#9792}
This commit is contained in:
Alex Glaznev
2015-08-26 16:02:21 -07:00
parent 13d35f6ffc
commit c47a01d647
2 changed files with 25 additions and 20 deletions

View File

@ -369,7 +369,10 @@ public class CallActivity extends Activity
private void callConnected() {
final long delta = System.currentTimeMillis() - callStartedTimeMs;
Log.i(TAG, "Call connected: delay=" + delta + "ms");
if (peerConnectionClient == null || isError) {
Log.w(TAG, "Call is connected in closed or error state");
return;
}
// Update video view.
updateVideoView();
// Enable statistics callback.