[FFmpeg-cvslog] dshow: save opened device reference so it may be properly closed

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:50:00 2011 -0300| [e3e962835fbcc0c5220382539c84afd700d6a369] | committer: Michael Niedermayer

dshow: save opened device reference so it may be properly closed

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3e962835fbcc0c5220382539c84afd700d6a369
---

 libavdevice/dshow.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 0191d51..af2cf90 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -561,11 +561,13 @@ static int
 dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum,
                           enum dshowDeviceType devtype)
 {
+    struct dshow_ctx *ctx = avctx->priv_data;
     IBaseFilter *device_filter = NULL;
     int r;
 
     if ((r = dshow_cycle_devices(avctx, devenum, devtype, &device_filter)) < 0)
         return r;
+    ctx->device_filter[devtype] = device_filter;
     if ((r = dshow_cycle_pins(avctx, devtype, device_filter, NULL)) < 0)
         return r;
 



More information about the ffmpeg-cvslog mailing list