[FFmpeg-devel] [PATCH 3/4] Fix compilation error around struct visibility when VDPAU disabled.

Dale Curtis dalecurtis at chromium.org
Thu May 22 00:36:44 CEST 2014


On Tue, May 20, 2014 at 8:13 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Tue, May 20, 2014 at 12:03:58PM -0700, Dale Curtis wrote:
> > ---
> >  libavcodec/vdpau_internal.h | 2 ++
> >  1 file changed, 2 insertions(+)
>
> how can this failure be reproduced ?
> i tried "./configure  --disable-vdpau" but that worked fine
>
>
You'll need to build with clang -Wall -Werror modulo disabling these
warnings:

https://code.google.com/p/chromium/codesearch#chromium/src/third_party/ffmpeg/ffmpeg.gyp&l=182

Although I'm not sure if all of FFmpeg will build with -Wall -Werror plus
those warnings disabled; those flags only build the subset of FFmpeg used
by Chrome. Here are the exact errors:

../../third_party/ffmpeg/libavcodec/vdpau_internal.h:80:40: error:
declaration of 'struct vdpau_picture_context' will not be visible outside
of this function [-Werror,-Wvisibility]
int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic,
                                       ^
../../third_party/ffmpeg/libavcodec/vdpau_internal.h:83:32: error:
declaration of 'struct vdpau_picture_context' will not be visible outside
of this function [-Werror,-Wvisibility]
int ff_vdpau_add_buffer(struct vdpau_picture_context *pic, const uint8_t
*buf,
                               ^

Another fix might be to not export these methods when VDPAU is disabled. I
forget if I tried that or not..

- dale


More information about the ffmpeg-devel mailing list