[FFmpeg-devel] [PATCH] avcodec/vdpau: Don't leak h264.h into all VDPAU codecs

Philip Langdale philipl at overt.org
Mon May 25 18:46:14 CEST 2015


h264.h and hevc.h are mutually exclusive due to defining some of the same
names. As such, we need to avoid forcing h264.h to be included if we want
hevc decode acceleration to be possible.

Signed-off-by: Philip Langdale <philipl at overt.org>
---
 libavcodec/vc1dec.c         | 1 +
 libavcodec/vdpau_internal.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index d39f344..d6cef3f 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -29,6 +29,7 @@
 #include "avcodec.h"
 #include "blockdsp.h"
 #include "get_bits.h"
+#include "h264.h"
 #include "internal.h"
 #include "mpeg_er.h"
 #include "mpegvideo.h"
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index cc49db8..fd94b52 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -29,13 +29,14 @@
 #if CONFIG_VDPAU
 #include <vdpau/vdpau.h>
 #endif
-#include "h264.h"
 
 #include "libavutil/frame.h"
 
 #include "avcodec.h"
 #include "mpeg4video.h"
 
+typedef struct H264Context H264Context;
+
 /** Extract VdpVideoSurface from an AVFrame */
 static inline uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
 {
-- 
2.1.4



More information about the ffmpeg-devel mailing list