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

Unified Diff: talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java

Issue 1285823002: VideoCapturerAndroid: Release queued camera frames when stopCapture() is called (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java b/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
index 25ed3f7b76f007c3fea5ba7975a7acc382d74858..dee414673c202ce279a7cd6779af761436562876 100644
--- a/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
+++ b/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
@@ -898,6 +898,8 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba
void stopReturnBuffersToCamera() {
this.camera = null;
+ queuedBuffers.clear();
+ // Frames in |pendingBuffers| need to be kept alive until they are returned.
Log.d(TAG, "stopReturnBuffersToCamera called."
+ (pendingBuffers.isEmpty() ?
" All buffers have been returned."
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698