]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/libx265: zero the padding bytes in extradata
authorJames Almer <jamrial@gmail.com>
Sat, 18 Jan 2020 00:29:22 +0000 (21:29 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 18 Jan 2020 15:45:59 +0000 (12:45 -0300)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/libx265.c

index 9e4711e50bc72e73a1e1d84d21625896c5607078..e42c7b4d85298ef3e4bb31ffcc842069a8c185b3 100644 (file)
@@ -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;