The root cause is when a DxgiContext is reseted, it has not been correctly cleared from DxgiOutputDuplicator. So during next CaptureFrame() function call, DxgiOutputDuplicator will spread the context change to a deleted instance. BUG=741252 Review-Url: https://codereview.webrtc.org/2975103002 Cr-Commit-Position: refs/heads/master@{#18992}
This commit is contained in:
parent
7b0c6fa274
commit
67e438ffe5
@ -21,10 +21,11 @@ DxgiAdapterContext::~DxgiAdapterContext() = default;
|
||||
DxgiFrameContext::DxgiFrameContext() = default;
|
||||
|
||||
DxgiFrameContext::~DxgiFrameContext() {
|
||||
DxgiDuplicatorController::Instance()->Unregister(this);
|
||||
Reset();
|
||||
}
|
||||
|
||||
void DxgiFrameContext::Reset() {
|
||||
DxgiDuplicatorController::Instance()->Unregister(this);
|
||||
controller_id = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -102,9 +102,8 @@ class DxgiDuplicatorController {
|
||||
int ScreenCount();
|
||||
|
||||
private:
|
||||
// DxgiFrameContext calls private Unregister(Context*) function during
|
||||
// destructing.
|
||||
friend DxgiFrameContext::~DxgiFrameContext();
|
||||
// DxgiFrameContext calls private Unregister(Context*) function in Reset().
|
||||
friend void DxgiFrameContext::Reset();
|
||||
|
||||
// scoped_refptr<DxgiDuplicatorController> accesses private AddRef() and
|
||||
// Release() functions.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user