mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 817141 - Call EndTrack()/Finish() from StopPreview() (as well) to prevent deadlock. r=kchen
This commit is contained in:
parent
ef9f3747d2
commit
2884d9a473
@ -251,6 +251,8 @@ DOMCameraPreview::StopPreview()
|
||||
DOM_CAMERA_LOGI("Stopping preview stream\n");
|
||||
mState = STOPPING;
|
||||
mCameraControl->StopPreview();
|
||||
mInput->EndTrack(TRACK_VIDEO);
|
||||
mInput->Finish();
|
||||
}
|
||||
|
||||
void
|
||||
@ -258,8 +260,11 @@ DOMCameraPreview::SetStateStopped()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "SetStateStopped() not called from main thread");
|
||||
|
||||
// see bug 809259 and bug 817367.
|
||||
if (mState != STOPPING) {
|
||||
mInput->EndTrack(TRACK_VIDEO);
|
||||
mInput->Finish();
|
||||
}
|
||||
mState = STOPPED;
|
||||
DOM_CAMERA_LOGI("Preview stream stopped\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user