Following b8c45bbcbc207293f955e838ea66106f4b65b1ac they contain allocated unit arrays which will get leaked. These operations were inconsistently applied and never actually needed (the old uninit left them in the correct state), so just drop them entirely.
Unified · Split
| @@ -299,9 +299,6 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) · 298 unmodified lines | |||
| 299 | VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; | 299 | VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; |
| 300 | VAEncPictureParameterBufferH264 *vpic = ctx->codec_picture_params; | 300 | VAEncPictureParameterBufferH264 *vpic = ctx->codec_picture_params; |
| 301 | 301 | ||
| 302 | memset(&priv->current_access_unit, 0, | ||
| 303 | sizeof(priv->current_access_unit)); | ||
| 304 | |||
| 305 | memset(sps, 0, sizeof(*sps)); | 302 | memset(sps, 0, sizeof(*sps)); |
| 306 | memset(pps, 0, sizeof(*pps)); | 303 | memset(pps, 0, sizeof(*pps)); |
| 307 | 304 | ||
| @@ -624,9 +621,6 @@ static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, · 316 unmodified lines | |||
| 624 | VAEncPictureParameterBufferH264 *vpic = pic->codec_picture_params; | 621 | VAEncPictureParameterBufferH264 *vpic = pic->codec_picture_params; |
| 625 | int i; | 622 | int i; |
| 626 | 623 | ||
| 627 | memset(&priv->current_access_unit, 0, | ||
| 628 | sizeof(priv->current_access_unit)); | ||
| 629 | |||
| 630 | if (pic->type == PICTURE_TYPE_IDR) { | 624 | if (pic->type == PICTURE_TYPE_IDR) { |
| 631 | av_assert0(pic->display_order == pic->encode_order); | 625 | av_assert0(pic->display_order == pic->encode_order); |
| 632 | 626 | ||
| @@ -270,9 +270,6 @@ static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx) · 269 unmodified lines | |||
| 270 | int chroma_format, bit_depth; | 270 | int chroma_format, bit_depth; |
| 271 | int i; | 271 | int i; |
| 272 | 272 | ||
| 273 | memset(&priv->current_access_unit, 0, | ||
| 274 | sizeof(priv->current_access_unit)); | ||
| 275 | |||
| 276 | memset(vps, 0, sizeof(*vps)); | 273 | memset(vps, 0, sizeof(*vps)); |
| 277 | memset(sps, 0, sizeof(*sps)); | 274 | memset(sps, 0, sizeof(*sps)); |
| 278 | memset(pps, 0, sizeof(*pps)); | 275 | memset(pps, 0, sizeof(*pps)); |