diff --git a/libavutil/video_enc_params.c b/libavutil/video_enc_params.c index 54bfed0ed9..33592dc128 100644 --- a/libavutil/video_enc_params.c +++ b/libavutil/video_enc_params.c @@ -27,11 +27,11 @@ AVVideoEncParams *av_video_enc_params_alloc(enum AVVideoEncParamsType type, unsigned int nb_blocks, size_t *out_size) { - const size_t blocks_offset = offsetof( - struct { - AVVideoEncParams p; - AVVideoBlockParams b; - }, b); + struct TestStruct { + AVVideoEncParams p; + AVVideoBlockParams b; + }; + const size_t blocks_offset = offsetof(struct TestStruct, b); size_t size = blocks_offset; AVVideoEncParams *par;