Commit e3e96283 authored by Ramiro Polla's avatar Ramiro Polla Committed by Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 21a928d0
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment