[FFmpeg-cvslog] dshow: release filter reference obtained from enumeration
Ramiro Polla
git at videolan.org
Sun Nov 6 01:39:40 CET 2011
ffmpeg | branch: master | Ramiro Polla <ramiro.polla at gmail.com> | Fri Sep 30 17:49:43 2011 -0300| [21a928d07c25c552765fcdbe320c1adeadbef5b8] | committer: Michael Niedermayer
dshow: release filter reference obtained from enumeration
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21a928d07c25c552765fcdbe320c1adeadbef5b8
---
libavdevice/dshow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 4f641e7..0191d51 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);
More information about the ffmpeg-cvslog
mailing list