summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_qsv.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-25 12:31:50 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-11-18 19:50:08 +0100
commit9181b9ec7c7e13a4f45847f2535ada67024ca16c (patch)
tree14d7d206c88b705d2de14f19c7b07ccd6772848f /libavutil/hwcontext_qsv.c
parentbd5ec3601f03c8fb5514673e862223defa6f7673 (diff)
downloadffmpeg-9181b9ec7c7e13a4f45847f2535ada67024ca16c.tar.gz
avutil/hwcontext_qsv: Remove redundant check
It has already been checked immediately before that said AVDictionaryEntry exists; checking again is redundant. Furthermore, av_hwdevice_find_type_by_name() requires its argument to be non-NULL, so adding a codepath that automatically calls it with that parameter is nonsense. The same goes for the argument corresponding to %s. Fixes Coverity issue 1491394. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil/hwcontext_qsv.c')
-rw-r--r--libavutil/hwcontext_qsv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 4ed50a31a0..268be9f8a1 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -1463,10 +1463,10 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device,
e = av_dict_get(opts, "child_device_type", NULL, 0);
if (e) {
- child_device_type = av_hwdevice_find_type_by_name(e ? e->value : NULL);
+ child_device_type = av_hwdevice_find_type_by_name(e->value);
if (child_device_type == AV_HWDEVICE_TYPE_NONE) {
av_log(ctx, AV_LOG_ERROR, "Unknown child device type "
- "\"%s\".\n", e ? e->value : NULL);
+ "\"%s\".\n", e->value);
return AVERROR(EINVAL);
}
} else if (CONFIG_VAAPI) {