ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Wed Nov 
15 19:15:23 2017 +0100| [15b019e40adb1fdc25f7ba1aca8f473619d07ae7] | committer: 
Timo Rothenpieler

avcodec/nvenc: fix double defined GUID on cygwin

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

 compat/nvenc/nvEncodeAPI.h |  2 +-
 libavcodec/nvenc.h         | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/compat/nvenc/nvEncodeAPI.h b/compat/nvenc/nvEncodeAPI.h
index c3a8294212..e662880f4d 100644
--- a/compat/nvenc/nvEncodeAPI.h
+++ b/compat/nvenc/nvEncodeAPI.h
@@ -77,7 +77,7 @@ extern "C" {
 typedef RECT NVENC_RECT;
 #else
 // 
=========================================================================================
-#ifndef GUID
+#if !defined(GUID) && !defined(GUID_DEFINED)
 /*!
  * \struct GUID
  * Abstracts the GUID structure for non-windows platforms.
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 55ac5f220d..8c1769e768 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -19,6 +19,13 @@
 #ifndef AVCODEC_NVENC_H
 #define AVCODEC_NVENC_H
 
+#if CONFIG_D3D11VA
+#define COBJMACROS
+#include "libavutil/hwcontext_d3d11va.h"
+#else
+typedef void ID3D11Device;
+#endif
+
 #include "compat/nvenc/nvEncodeAPI.h"
 
 #include "config.h"
@@ -27,13 +34,6 @@
 #include "libavutil/fifo.h"
 #include "libavutil/opt.h"
 
-#if CONFIG_D3D11VA
-#define COBJMACROS
-#include "libavutil/hwcontext_d3d11va.h"
-#else
-typedef void ID3D11Device;
-#endif
-
 #include "avcodec.h"
 
 #define MAX_REGISTERED_FRAMES 64

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to