[vlc-commits] av_vdpau_alloc_context replacement for FFmpeg

Rafaël Carré git at videolan.org
Wed Mar 5 11:09:49 CET 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Mar  5 11:02:18 2014 +0100| [929692f45fc81f9dd4daf5981fcc26c9dc136214] | committer: Rafaël Carré

av_vdpau_alloc_context replacement for FFmpeg

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=929692f45fc81f9dd4daf5981fcc26c9dc136214
---

 modules/codec/avcodec/avcommon_compat.h |    4 ++++
 modules/codec/avcodec/hwdummy.c         |    1 +
 modules/hw/vdpau/avcodec.c              |    1 +
 3 files changed, 6 insertions(+)

diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index 0c02010..f6301bf 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -479,6 +479,10 @@ enum {
 # define err_recognition error_recognition
 #endif
 
+#if LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR <= 42 && LIBAVCODEC_VERSION_MICRO >= 100
+# define av_vdpau_alloc_context av_alloc_vdpaucontext
+#endif
+
 #endif /* HAVE_LIBAVCODEC_AVCODEC_H */
 
 #ifdef HAVE_LIBAVUTIL_AVUTIL_H
diff --git a/modules/codec/avcodec/hwdummy.c b/modules/codec/avcodec/hwdummy.c
index 112087d..658669d 100644
--- a/modules/codec/avcodec/hwdummy.c
+++ b/modules/codec/avcodec/hwdummy.c
@@ -34,6 +34,7 @@
 #include <vlc_fourcc.h>
 #include <vlc_picture.h>
 #include "../../codec/avcodec/va.h"
+#include "../../codec/avcodec/avcommon_compat.h"
 
 static int Open(vlc_va_t *, AVCodecContext *, const es_format_t *);
 static void Close(vlc_va_t *);
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 0b21f0f..392f03a 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -37,6 +37,7 @@
 #include <vlc_xlib.h>
 #include "vlc_vdpau.h"
 #include "../../codec/avcodec/va.h"
+#include "../../codec/avcodec/avcommon_compat.h"
 
 static int Open(vlc_va_t *, AVCodecContext *, const es_format_t *);
 static void Close(vlc_va_t *);



More information about the vlc-commits mailing list