• Ricky Liang's avatar
    media: handle StopAndDeAllocate after suspend correctly · 7b942760
    Ricky Liang authored
    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: default avatarWu-Cheng Li <wuchengli@chromium.org>
    Commit-Queue: Ricky Liang <jcliang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#539091}
    7b942760
camera_device_delegate.cc 16.1 KB