summaryrefslogtreecommitdiff
path: root/libavdevice/dshow.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2011-09-30 17:50:00 -0300
committerMichael Niedermayer <michaelni@gmx.at>2011-11-06 01:19:57 +0100
commite3e962835fbcc0c5220382539c84afd700d6a369 (patch)
treebe562f36d7c9b137b8669ca19cdbbd0113f953dd /libavdevice/dshow.c
parent21a928d07c25c552765fcdbe320c1adeadbef5b8 (diff)
dshow: save opened device reference so it may be properly closed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/dshow.c')
-rw-r--r--libavdevice/dshow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 0191d51062..af2cf9060c 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;