From: "Gabriel Ivăncescu" Subject: [PATCH v4 8/9] qedit: Remove the splitter from the graph if it failed to connect. Message-Id: <9eb9aee269cbde3d498bf1abf7c2feebc07c708c.1587471285.git.gabrielopcode@gmail.com> Date: Tue, 21 Apr 2020 15:19:32 +0300 In-Reply-To: <7caadc4394fe7b68c2603e67ddd2c8f57932fa86.1587471285.git.gabrielopcode@gmail.com> References: <7caadc4394fe7b68c2603e67ddd2c8f57932fa86.1587471285.git.gabrielopcode@gmail.com> Signed-off-by: Gabriel Ivăncescu --- dlls/qedit/mediadet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index 0a9210c..e0002cc 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -219,7 +219,11 @@ static HRESULT get_splitter(MediaDetImpl *This) VariantClear(&var); This->splitter = splitter; if (FAILED(hr)) - goto retry; + { + IBaseFilter_Release(splitter); + This->splitter = NULL; + continue; + } hr = IBaseFilter_EnumPins(This->source, &pins); if (FAILED(hr)) @@ -248,6 +252,7 @@ static HRESULT get_splitter(MediaDetImpl *This) break; retry: + IGraphBuilder_RemoveFilter(This->graph, splitter); IBaseFilter_Release(splitter); This->splitter = NULL; } -- 2.21.0