---
 libavcodec/avcodec.h | 2 ++
 libavcodec/vdpau.h   | 3 ++-
 libavcodec/version.h | 3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f4a10e1..57d53c2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -699,10 +699,12 @@ typedef struct RcOverride{
  * This can be used to prevent truncation of the last audio samples.
  */
 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
+#if FF_API_CAP_VDPAU
 /**
  * Codec can export data for HW decoding (VDPAU).
  */
 #define CODEC_CAP_HWACCEL_VDPAU    0x0080
+#endif
 /**
  * Codec can output multiple frames per AVPacket
  * Normally demuxers return one frame at a time, demuxers which do not do
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index a589315..18efcaa 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -113,7 +113,7 @@ typedef struct AVVDPAUContext {
     VdpBitstreamBuffer *bitstream_buffers;
 } AVVDPAUContext;
 
-
+#if FF_API_CAP_VDPAU
 /** @brief The videoSurface is used for rendering. */
 #define FF_VDPAU_STATE_USED_FOR_RENDER 1
 
@@ -145,6 +145,7 @@ struct vdpau_render_state {
     /** The user is responsible for freeing this buffer using av_freep(). */
     VdpBitstreamBuffer *bitstream_buffers;
 };
+#endif
 
 /* @}*/
 
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 7c82519..d9cc683 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -64,5 +64,8 @@
 #ifndef FF_API_LOWRES
 #define FF_API_LOWRES            (LIBAVCODEC_VERSION_MAJOR < 56)
 #endif
+#ifndef FF_API_CAP_VDPAU
+#define FF_API_CAP_VDPAU         (LIBAVCODEC_VERSION_MAJOR < 56)
+#endif
 
 #endif /* AVCODEC_VERSION_H */
-- 
1.8.3.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to