[FFmpeg-cvslog] Merge commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b'

James Almer git at videolan.org
Wed Oct 25 01:15:12 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Oct 24 19:14:22 2017 -0300| [4e9dc52a9703f84a0e996263018745afa1118aa0] | committer: James Almer

Merge commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b'

* commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b':
  hwcontext: Move NONE to the be the first member of AVHWDeviceType

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e9dc52a9703f84a0e996263018745afa1118aa0
---

 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 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;
diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h
index 03334e20e0..d20810422c 100644
--- a/libavutil/hwcontext.h
+++ b/libavutil/hwcontext.h
@@ -25,13 +25,13 @@
 #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_VIDEOTOOLBOX,
-    AV_HWDEVICE_TYPE_NONE,
     AV_HWDEVICE_TYPE_D3D11VA,
     AV_HWDEVICE_TYPE_DRM,
 };


======================================================================

diff --cc libavutil/hwcontext.h
index 03334e20e0,889e30365e..d20810422c
--- a/libavutil/hwcontext.h
+++ b/libavutil/hwcontext.h
@@@ -30,10 -31,6 +31,9 @@@ enum AVHWDeviceType 
      AV_HWDEVICE_TYPE_VAAPI,
      AV_HWDEVICE_TYPE_DXVA2,
      AV_HWDEVICE_TYPE_QSV,
 +    AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
-     AV_HWDEVICE_TYPE_NONE,
 +    AV_HWDEVICE_TYPE_D3D11VA,
 +    AV_HWDEVICE_TYPE_DRM,
  };
  
  typedef struct AVHWDeviceInternal AVHWDeviceInternal;



More information about the ffmpeg-cvslog mailing list