[FFmpeg-devel] [PATCH v3] avcodec: libdav1d AV1 decoder wrapper.

Dale Curtis dalecurtis at chromium.org
Sat Oct 27 02:56:12 EEST 2018


Yes, all your suggestions silence the errors. Thanks!

- dale

On Fri, Oct 26, 2018 at 4:05 PM James Almer <jamrial at gmail.com> wrote:

> On 10/26/2018 7:31 PM, Dale Curtis wrote:
> > The following warnings show up when compiling with clang:
> > ../../third_party/ffmpeg/libavcodec/libdav1d.c:92:24: error: suggest
> braces
> > around initialization of subobject [-Werror,-Wmissing-braces]
> >     Dav1dPicture p = { 0 };
> >                        ^
> >                        {}
>
> Does "Dav1dPicture p = { .ref = opaque };" silences this one up?
>
> > ../../third_party/ffmpeg/libavcodec/libdav1d.c:119:24: error: suggest
> > braces around initialization of subobject [-Werror,-Wmissing-braces]
> >     Dav1dPicture p = { 0 };
> >                        ^
> >                        {}
>
> For this one I'd have to use { { 0 } } or a memset, but maybe the struct
> could start with an int or something else instead of the data pointer
> arrays.
>
> > ../../third_party/ffmpeg/libavcodec/libdav1d.c:194:45: error: implicit
> > conversion from enumeration type 'enum Dav1dMatrixCoefficients' to
> > different enumeration type 'enum AVColorSpace'
> [-Werror,-Wenum-conversion]
> >     frame->colorspace = c->colorspace = p.p.mtrx;
> >                                       ~ ~~~~^~~~
> > ../../third_party/ffmpeg/libavcodec/libdav1d.c:195:55: error: implicit
> > conversion from enumeration type 'enum Dav1dColorPrimaries' to different
> > enumeration type 'enum AVColorPrimaries' [-Werror,-Wenum-conversion]
> >     frame->color_primaries = c->color_primaries = p.p.pri;
> >                                                 ~ ~~~~^~~
> > ../../third_party/ffmpeg/libavcodec/libdav1d.c:196:43: error: implicit
> > conversion from enumeration type 'enum Dav1dTransferCharacteristics' to
> > different enumeration type 'enum AVColorTransferCharacteristic'
> > [-Werror,-Wenum-conversion]
> >     frame->color_trc = c->color_trc = p.p.trc;
> >                                     ~ ~~~~^~~
>
> I can cast the enums to silence these errors, sure.
>
> > 5 errors generated.
>
> 5 very pedantic "errors" :p
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list