aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2011-09-13 14:55:08 -0300
committerStefano Sabatini <stefasab@gmail.com>2011-09-16 11:16:05 +0200
commita1644f6287a55afbb57a6678b69941ba3d80650f (patch)
tree8a90e1eb0b3e38146ae054313ae1df7b708b7ffd
parent215e197942e33d5c5749d786e938bf7abe856c1d (diff)
downloadffmpeg-a1644f6287a55afbb57a6678b69941ba3d80650f.tar.gz
dshow: reset list for each filter removed
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
-rw-r--r--libavdevice/dshow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 8dc9df998e..5fa9000f95 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -138,7 +138,9 @@ dshow_read_close(AVFormatContext *s)
IBaseFilter *f;
IEnumFilters_Reset(fenum);
while (IEnumFilters_Next(fenum, 1, &f, NULL) == S_OK)
- IGraphBuilder_RemoveFilter(ctx->graph, f);
+ if (IGraphBuilder_RemoveFilter(ctx->graph, f) == S_OK)
+ IEnumFilters_Reset(fenum); /* When a filter is removed,
+ * the list must be reset. */
IEnumFilters_Release(fenum);
}
IGraphBuilder_Release(ctx->graph);