mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-06 08:08:58 +02:00
dshow: release filter reference obtained from enumeration
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5b186148bf
commit
21a928d07c
@ -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…
Reference in New Issue
Block a user