lavc/vaapi_hevc: Do not initialize fields twice.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 27 Mar 2019 13:52:35 +0000 (14:52 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 27 Mar 2019 23:33:07 +0000 (00:33 +0100)
Fixes the following compilation warnings:
libavcodec/vaapi_hevc.c:155:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
        .pic_fields.bits = {
                   ~^~~~
libavcodec/vaapi_hevc.c:125:57: note: previous initialization is here
        .pic_fields.value                             = 0,
                                                        ^
libavcodec/vaapi_hevc.c:175:31: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
        .slice_parsing_fields.bits = {
                             ~^~~~
libavcodec/vaapi_hevc.c:126:57: note: previous initialization is here
        .slice_parsing_fields.value                   = 0,

Reviewed-by: Mark Thompson
libavcodec/vaapi_hevc.c

index 19aabcd..c69d63d 100644 (file)
@@ -122,8 +122,6 @@ static int vaapi_hevc_start_frame(AVCodecContext          *avctx,
     pic->pic.output_surface = ff_vaapi_get_surface_id(h->ref->frame);
 
     pic->pic_param = (VAPictureParameterBufferHEVC) {
-        .pic_fields.value                             = 0,
-        .slice_parsing_fields.value                   = 0,
         .pic_width_in_luma_samples                    = sps->width,
         .pic_height_in_luma_samples                   = sps->height,
         .log2_min_luma_coding_block_size_minus3       = sps->log2_min_cb_size - 3,