mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-10-19 09:53:18 +00:00
avdevice/dshow: Check device_filter_unique_name before use
Fixes: CID1591931 Explicit null dereferenced
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 175c191668
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d3b625a551
commit
d71876ec5c
1 changed files with 1 additions and 1 deletions
|
@ -780,7 +780,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum,
|
|||
if (ctx->device_filter[otherDevType]) {
|
||||
// avoid adding add two instances of the same device to the graph, one for video, one for audio
|
||||
// a few devices don't support this (could also do this check earlier to avoid double crossbars, etc. but they seem OK)
|
||||
if (strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) {
|
||||
if (!device_filter_unique_name || strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) {
|
||||
av_log(avctx, AV_LOG_DEBUG, "reusing previous graph capture filter... %s\n", device_filter_unique_name);
|
||||
IBaseFilter_Release(device_filter);
|
||||
device_filter = ctx->device_filter[otherDevType];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue