VideoCapturerAndroid: Release queued camera frames when stopCapture() is called

BUG=webrtc:4892

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

Cr-Commit-Position: refs/heads/master@{#9709}
This commit is contained in:
magjed
2015-08-14 02:42:15 -07:00
committed by Commit bot
parent 38f8893235
commit af5c035e43

View File

@ -898,6 +898,8 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba
void stopReturnBuffersToCamera() { void stopReturnBuffersToCamera() {
this.camera = null; this.camera = null;
queuedBuffers.clear();
// Frames in |pendingBuffers| need to be kept alive until they are returned.
Log.d(TAG, "stopReturnBuffersToCamera called." Log.d(TAG, "stopReturnBuffersToCamera called."
+ (pendingBuffers.isEmpty() ? + (pendingBuffers.isEmpty() ?
" All buffers have been returned." " All buffers have been returned."