[FFmpeg-cvslog] avcodec/dnxhdenc: fill unused bytes from put bits buffer with zeros

Paul B Mahol git at videolan.org
Sun Mar 6 00:02:14 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Mar  5 23:02:18 2022 +0100| [14c9b7b194221dbf358d4a44fb4db049fc95afa9] | committer: Paul B Mahol

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14c9b7b194221dbf358d4a44fb4db049fc95afa9
---

 libavcodec/dnxhdenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 9bdecec284..9928ba0525 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -909,6 +909,7 @@ static int dnxhd_encode_thread(AVCodecContext *avctx, void *arg,
     if (put_bits_count(&ctx->m.pb) & 31)
         put_bits(&ctx->m.pb, 32 - (put_bits_count(&ctx->m.pb) & 31), 0);
     flush_put_bits(&ctx->m.pb);
+    memset(put_bits_ptr(&ctx->m.pb), 0, put_bytes_left(&ctx->m.pb, 0));
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list