void AV1Encoder::init_av1()
{
EbSvtAv1EncConfiguration config;
+
+ // svt_av1_enc_init_handle() is defined to fill config with the defaults;
+ // yet, seemingly, not everything is written, and some of it can cause
+ // Valgrind warnings and/or crashes. It should never hurt to put it
+ // into a known state beforehand, and it seems to fix the crashes,
+ // so we do that.
+ memset(&config, 0, sizeof(config));
+
EbErrorType ret = svt_av1_enc_init_handle(&encoder, nullptr, &config);
if (ret != EB_ErrorNone) {
fprintf(stderr, "Error initializing SVT-AV1 handle (error %08x)\n", ret);