ffmpeg | branch: master | Mark Thompson <s...@jkqxz.net> | Thu Mar 23 19:49:39 2017 +0000| [1bd986ed4b0e95ded368a8eeb5c044853c090f9b] | committer: Mark Thompson
hwcontext: Move NONE to the be the first member of AVHWDeviceType Also use that to fix a warning in av_hwdevice_get_type_name(). > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1bd986ed4b0e95ded368a8eeb5c044853c090f9b --- libavutil/hwcontext.c | 3 ++- libavutil/hwcontext.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 2c6d51ee55..ff9fe99aba 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -67,7 +67,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; diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h index 040e010b30..889e30365e 100644 --- a/libavutil/hwcontext.h +++ b/libavutil/hwcontext.h @@ -25,12 +25,12 @@ #include "pixfmt.h" enum AVHWDeviceType { + AV_HWDEVICE_TYPE_NONE, AV_HWDEVICE_TYPE_VDPAU, AV_HWDEVICE_TYPE_CUDA, AV_HWDEVICE_TYPE_VAAPI, AV_HWDEVICE_TYPE_DXVA2, AV_HWDEVICE_TYPE_QSV, - AV_HWDEVICE_TYPE_NONE, }; typedef struct AVHWDeviceInternal AVHWDeviceInternal; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog