The bitstream buffers are now private and freed by libavcodec. For
backward compatibility, the hold bitstream buffer pointer is left NULL
(applications were supposed to av_freep() it).
---
libavcodec/vdpau.h | 8 ++++++++
libavcodec/vdpau_internal.h | 9 +++++++++
libavcodec/version.h | 3 +++
3 files changed, 20 insertions(+)
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 18efcaa..8bedea5 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -52,12 +52,14 @@
#include <vdpau/vdpau.h>
#include <vdpau/vdpau_x11.h>
+#if FF_API_BUFS_VDPAU
union AVVDPAUPictureInfo {
VdpPictureInfoH264 h264;
VdpPictureInfoMPEG1Or2 mpeg;
VdpPictureInfoVC1 vc1;
VdpPictureInfoMPEG4Part2 mpeg4;
};
+#endif
/**
* This structure is used to share data between the libavcodec library and
@@ -83,11 +85,13 @@ typedef struct AVVDPAUContext {
*/
VdpDecoderRender *render;
+#if FF_API_BUFS_VDPAU
/**
* VDPAU picture information
*
* Set by libavcodec.
*/
+ attribute_deprecated
union AVVDPAUPictureInfo info;
/**
@@ -95,6 +99,7 @@ typedef struct AVVDPAUContext {
*
* Set by libavcodec.
*/
+ attribute_deprecated
int bitstream_buffers_allocated;
/**
@@ -102,6 +107,7 @@ typedef struct AVVDPAUContext {
*
* Set by libavcodec.
*/
+ attribute_deprecated
int bitstream_buffers_used;
/**
@@ -110,7 +116,9 @@ typedef struct AVVDPAUContext {
*
* Set by libavcodec.
*/
+ attribute_deprecated
VdpBitstreamBuffer *bitstream_buffers;
+#endif
} AVVDPAUContext;
#if FF_API_CAP_VDPAU
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index e93c672..9e4ab4e 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -35,6 +35,15 @@ static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic)
return (uintptr_t)pic->f.data[3];
}
+#if !FF_API_BUFS_VDPAU
+union AVVDPAUPictureInfo {
+ VdpPictureInfoH264 h264;
+ VdpPictureInfoMPEG1Or2 mpeg;
+ VdpPictureInfoVC1 vc1;
+ VdpPictureInfoMPEG4Part2 mpeg4;
+};
+#endif
+
struct vdpau_picture_context {
/**
* VDPAU picture information.
diff --git a/libavcodec/version.h b/libavcodec/version.h
index d9cc683..4e7f683 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -67,5 +67,8 @@
#ifndef FF_API_CAP_VDPAU
#define FF_API_CAP_VDPAU (LIBAVCODEC_VERSION_MAJOR < 56)
#endif
+#ifndef FF_API_BUFS_VDPAU
+#define FF_API_BUFS_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