[FFmpeg-cvslog] avcodec/libx265: zero the padding bytes in extradata

James Almer git at videolan.org
Sat Jan 18 17:47:12 EET 2020


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Jan 17 21:29:22 2020 -0300| [6ae84e7b037f8ceafff5b7bf17a317cc1ce0acb0] | committer: James Almer

avcodec/libx265: zero the padding bytes in extradata

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 9e4711e50b..e42c7b4d85 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -400,6 +400,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
         }
 
         memcpy(avctx->extradata, nal[0].payload, avctx->extradata_size);
+        memset(avctx->extradata + avctx->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list