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

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java

Issue 1308733004: Android: Fix memory leak for remote MediaStream (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: use helper NewGlobalRef function instead Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/java/jni/peerconnection_jni.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 } 904 }
905 } 905 }
906 }); 906 });
907 } 907 }
908 908
909 @Override 909 @Override
910 public void onRemoveStream(final MediaStream stream){ 910 public void onRemoveStream(final MediaStream stream){
911 executor.execute(new Runnable() { 911 executor.execute(new Runnable() {
912 @Override 912 @Override
913 public void run() { 913 public void run() {
914 if (peerConnection == null || isError) {
915 return;
916 }
917 remoteVideoTrack = null; 914 remoteVideoTrack = null;
918 stream.videoTracks.get(0).dispose();
919 } 915 }
920 }); 916 });
921 } 917 }
922 918
923 @Override 919 @Override
924 public void onDataChannel(final DataChannel dc) { 920 public void onDataChannel(final DataChannel dc) {
925 reportError("AppRTC doesn't use data channels, but got: " + dc.label() 921 reportError("AppRTC doesn't use data channels, but got: " + dc.label()
926 + " anyway!"); 922 + " anyway!");
927 } 923 }
928 924
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 public void onCreateFailure(final String error) { 1003 public void onCreateFailure(final String error) {
1008 reportError("createSDP error: " + error); 1004 reportError("createSDP error: " + error);
1009 } 1005 }
1010 1006
1011 @Override 1007 @Override
1012 public void onSetFailure(final String error) { 1008 public void onSetFailure(final String error) {
1013 reportError("setSDP error: " + error); 1009 reportError("setSDP error: " + error);
1014 } 1010 }
1015 } 1011 }
1016 } 1012 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/jni/peerconnection_jni.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698