From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v5: Rebased onto cleanup of find_splitter().
This supersedes https://source.winehq.org/patches/data/183892.
dlls/qedit/mediadet.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index d63825c6290..eb7a51928b9 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -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); }