[FFmpeg-devel] [PATCH] avcodec/vdpau: Don't leak h264.h into all VDPAU codecs
Philip Langdale
philipl at overt.org
Tue May 26 01:30:37 CEST 2015
On Mon, 25 May 2015 13:14:05 -0700
Philip Langdale <philipl at overt.org> wrote:
> On Mon, 25 May 2015 20:34:34 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
>
> > On Mon, May 25, 2015 at 09:46:14AM -0700, Philip Langdale wrote:
> > > 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(-)
> >
> > this breaks build (with clang at least)
> >
> > CC libavcodec/h264.o
> > In file included from ffmpeg/libavcodec/h264.c:1:
> > In file included from ffmpeg/libavcodec/h264.c:52:
> > ffmpeg/libavcodec/vdpau_internal.h:38:28: error: redefinition of
> > typedef 'H264Context' is invalid in C [-Wtypedef-redefinition]
> > typedef struct H264Context H264Context; ^
> > ffmpeg/libavcodec/h264.h:799:3: note: previous definition is here
> > } H264Context;
> > ^
> > 1 error generated.
> > make: *** [libavcodec/h264.o] Error 1
> >
>
> Huh. No warnings with gcc 4.9 here. I should be able to tweak it to
> work.
So, gcc only triggers this warning with pedantic turned on. Anyway, I
didn't bother trying to see how clever I could be, and I've refactored
the old pre-hwaccel functions into a separate header to fix this
comprehensively.
--phil
More information about the ffmpeg-devel
mailing list