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) ...@@ -193,17 +193,12 @@ static HRESULT find_splitter(MediaDetImpl *detector)
hr = IBaseFilter_EnumPins(splitter, &enum_pins); hr = IBaseFilter_EnumPins(splitter, &enum_pins);
if (FAILED(hr)) if (FAILED(hr))
{ goto next;
IBaseFilter_Release(splitter);
continue;
}
hr = IEnumPins_Next(enum_pins, 1, &splitter_pin, NULL); hr = IEnumPins_Next(enum_pins, 1, &splitter_pin, NULL);
IEnumPins_Release(enum_pins); IEnumPins_Release(enum_pins);
if (FAILED(hr)) if (FAILED(hr))
{ goto next;
IBaseFilter_Release(splitter);
continue;
}
hr = IPin_Connect(source_pin, splitter_pin, NULL); hr = IPin_Connect(source_pin, splitter_pin, NULL);
IPin_Release(splitter_pin); IPin_Release(splitter_pin);
...@@ -213,6 +208,8 @@ static HRESULT find_splitter(MediaDetImpl *detector) ...@@ -213,6 +208,8 @@ static HRESULT find_splitter(MediaDetImpl *detector)
break; break;
} }
next:
IGraphBuilder_RemoveFilter(detector->graph, splitter);
IBaseFilter_Release(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