diff options
Diffstat (limited to 'libavutil/hwcontext.c')
-rw-r--r-- | libavutil/hwcontext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 048e82126f..7f8e22736c 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -79,7 +79,8 @@ enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name) const char *av_hwdevice_get_type_name(enum AVHWDeviceType type) { - if (type >= 0 && type < FF_ARRAY_ELEMS(hw_type_names)) + if (type > AV_HWDEVICE_TYPE_NONE && + type < FF_ARRAY_ELEMS(hw_type_names)) return hw_type_names[type]; else return NULL; |