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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 9386020: delete the corresponding controller when a capture device is closed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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: content/browser/renderer_host/media/video_capture_manager.cc
===================================================================
--- content/browser/renderer_host/media/video_capture_manager.cc (revision 121736)
+++ content/browser/renderer_host/media/video_capture_manager.cc (working copy)
@@ -207,6 +207,11 @@
if (video_capture_device && !DeviceInUse(video_capture_device)) {
// Deallocate (if not done already) and delete the device.
video_capture_device->DeAllocate();
+ Controllers::iterator cit = controllers_.find(video_capture_device);
+ if (cit != controllers_.end()) {
+ delete cit->second;
+ controllers_.erase(cit);
+ }
delete video_capture_device;
}
« 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