media: handle StopAndDeAllocate after suspend correctly
Some application (e.g. Hangouts) closes the camera explicitly on system suspend. As the Chrome OS VCD also closes the camera on system suspend without going through the full destruction of the VideoCaptureDevice, this results in StopAndDeAllocate being called back-to-back. The second call to StopAndDeAllocate should simply return if the device context is already destroyed. BUG=b:73436939 TEST=unit tests TEST=Verify that Hangouts call works correctly on Soraka when system suspends Change-Id: Id6127b751ccc5bc71538d622bc0905bf03951e0d Reviewed-on: https://chromium-review.googlesource.com/930605Reviewed-by:Wu-Cheng Li <wuchengli@chromium.org> Commit-Queue: Ricky Liang <jcliang@chromium.org> Cr-Commit-Position: refs/heads/master@{#539091}
Showing
Please register or sign in to comment