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) ...@@ -121,10 +121,12 @@ dshow_read_close(AVFormatContext *s)
if (r == S_OK) { if (r == S_OK) {
IBaseFilter *f; IBaseFilter *f;
IEnumFilters_Reset(fenum); 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) if (IGraphBuilder_RemoveFilter(ctx->graph, f) == S_OK)
IEnumFilters_Reset(fenum); /* When a filter is removed, IEnumFilters_Reset(fenum); /* When a filter is removed,
* the list must be reset. */ * the list must be reset. */
IBaseFilter_Release(f);
}
IEnumFilters_Release(fenum); IEnumFilters_Release(fenum);
} }
IGraphBuilder_Release(ctx->graph); 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