]> git.sesse.net Git - ffmpeg/commit
avcodec/encode: Zero padding in ff_get_encode_buffer()
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Mon, 26 Apr 2021 18:47:03 +0000 (20:47 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Mon, 26 Apr 2021 22:20:53 +0000 (00:20 +0200)
commitad184c8e363018044715cbe9ebc0b576e54a6438
tree149f60128cc0741d5184d51505f1f0849444dbbe
parent2a623bacc8457c51477f02f06ff9eff16afb615a
avcodec/encode: Zero padding in ff_get_encode_buffer()

The documentation of the get_encode_buffer() callback does not require
to zero the padding; therefore we do it in ff_get_encode_buffer().
This also constitutes an implicit check for whether the buffer is
actually allocated with padding.

The memset in avcodec_default_get_encode_buffer() is now redundant and
has been removed.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/encode.c