Skip to content

Instantly share code, notes, and snippets.

@rdp
Created April 1, 2020 05:11
Show Gist options
  • Save rdp/c897eadcf6d250394bdc6bd68a7f5d25 to your computer and use it in GitHub Desktop.
Save rdp/c897eadcf6d250394bdc6bd68a7f5d25 to your computer and use it in GitHub Desktop.
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index d7f5bd7..afd8cef 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -716,9 +716,9 @@ dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum,
if ((r = dshow_cycle_devices(avctx, devenum, devtype, sourcetype, &device_filter, &device_unique_name)) < 0)
return r;
ctx->device_filter[devtype] = device_filter;
+ ctx->device_unique_name[devtype] = device_unique_name;
if ((r = dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, NULL)) < 0)
return r;
- av_freep(&device_unique_name);
return 0;
}
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment