Commit 4d94e773 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

qedit: Remove the splitter from the graph if it failed to connect.

parent 2e6f5e67
......@@ -193,17 +193,12 @@ static HRESULT find_splitter(MediaDetImpl *detector)
hr = IBaseFilter_EnumPins(splitter, &enum_pins);
if (FAILED(hr))
{
IBaseFilter_Release(splitter);
continue;
}
goto next;
hr = IEnumPins_Next(enum_pins, 1, &splitter_pin, NULL);
IEnumPins_Release(enum_pins);
if (FAILED(hr))
{
IBaseFilter_Release(splitter);
continue;
}
goto next;
hr = IPin_Connect(source_pin, splitter_pin, NULL);
IPin_Release(splitter_pin);
......@@ -213,6 +208,8 @@ static HRESULT find_splitter(MediaDetImpl *detector)
break;
}
next:
IGraphBuilder_RemoveFilter(detector->graph, splitter);
IBaseFilter_Release(splitter);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment