Browse Source

dshow: release filter reference obtained from enumeration

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Ramiro Polla Michael Niedermayer 13 years ago
parent
commit
21a928d07c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavdevice/dshow.c

+ 3
- 1
libavdevice/dshow.c View File

@@ -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);


Loading…
Cancel
Save