avcodec/dnxhdenc: fill unused bytes from put bits buffer with zeros

release/5.1
Paul B Mahol 3 years ago
parent fb5e871937
commit 14c9b7b194
  1. 1
      libavcodec/dnxhdenc.c

@ -909,6 +909,7 @@ static int dnxhd_encode_thread(AVCodecContext *avctx, void *arg,
if (put_bits_count(&ctx->m.pb) & 31) if (put_bits_count(&ctx->m.pb) & 31)
put_bits(&ctx->m.pb, 32 - (put_bits_count(&ctx->m.pb) & 31), 0); put_bits(&ctx->m.pb, 32 - (put_bits_count(&ctx->m.pb) & 31), 0);
flush_put_bits(&ctx->m.pb); flush_put_bits(&ctx->m.pb);
memset(put_bits_ptr(&ctx->m.pb), 0, put_bytes_left(&ctx->m.pb, 0));
return 0; return 0;
} }

Loading…
Cancel
Save