Commit 21a928d0 authored by Ramiro Polla's avatar Ramiro Polla Committed by Michael Niedermayer

dshow: release filter reference obtained from enumeration

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5b186148
......@@ -121,10 +121,12 @@ dshow_read_close(AVFormatContext *s)
if (r == S_OK) {
IBaseFilter *f;
IEnumFilters_Reset(fenum);
while (IEnumFilters_Next(fenum, 1, &f, NULL) == S_OK)
while (IEnumFilters_Next(fenum, 1, &f, NULL) == S_OK) {
if (IGraphBuilder_RemoveFilter(ctx->graph, f) == S_OK)
IEnumFilters_Reset(fenum); /* When a filter is removed,
* the list must be reset. */
IBaseFilter_Release(f);
}
IEnumFilters_Release(fenum);
}
IGraphBuilder_Release(ctx->graph);
......
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