diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2011-09-30 17:49:43 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-06 01:19:56 +0100 |
commit | 21a928d07c25c552765fcdbe320c1adeadbef5b8 (patch) | |
tree | 33f01189fac11c0d5314b7665cd0469604eeea78 /libavdevice/dshow.c | |
parent | 5b186148bf05b1186a9b8abdd8c0c088049341ee (diff) | |
download | ffmpeg-21a928d07c25c552765fcdbe320c1adeadbef5b8.tar.gz |
dshow: release filter reference obtained from enumeration
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/dshow.c')
-rw-r--r-- | libavdevice/dshow.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 4f641e7211..0191d51062 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -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); |