mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
dshow: save opened device reference so it may be properly closed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
21a928d07c
commit
e3e962835f
@ -561,11 +561,13 @@ static int
|
|||||||
dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum,
|
dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum,
|
||||||
enum dshowDeviceType devtype)
|
enum dshowDeviceType devtype)
|
||||||
{
|
{
|
||||||
|
struct dshow_ctx *ctx = avctx->priv_data;
|
||||||
IBaseFilter *device_filter = NULL;
|
IBaseFilter *device_filter = NULL;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if ((r = dshow_cycle_devices(avctx, devenum, devtype, &device_filter)) < 0)
|
if ((r = dshow_cycle_devices(avctx, devenum, devtype, &device_filter)) < 0)
|
||||||
return r;
|
return r;
|
||||||
|
ctx->device_filter[devtype] = device_filter;
|
||||||
if ((r = dshow_cycle_pins(avctx, devtype, device_filter, NULL)) < 0)
|
if ((r = dshow_cycle_pins(avctx, devtype, device_filter, NULL)) < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user