diff mbox series

[FFmpeg-devel,29/39] avcodec/omx: Zero packet padding

Message ID HE1PR0301MB21544FB32C5F221E039B35D58F299@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit 7a57c5ab915a26afd03447ba130cf88c5f8dca77
Headers show
Series [FFmpeg-devel,01/39] avcodec/audiotoolboxenc: Remove AV_CODEC_CAP_DR1 | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt May 21, 2021, 9:17 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/omx.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavcodec/omx.c b/libavcodec/omx.c
index ddb3ba4f66..9597c60057 100644
--- a/libavcodec/omx.c
+++ b/libavcodec/omx.c
@@ -871,6 +871,7 @@  static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
             memcpy(s->output_buf + s->output_buf_size, buffer->pBuffer + buffer->nOffset, buffer->nFilledLen);
             s->output_buf_size += buffer->nFilledLen;
             if (buffer->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) {
+                memset(s->output_buf + s->output_buf_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
                 if ((ret = av_packet_from_data(pkt, s->output_buf, s->output_buf_size)) < 0) {
                     av_freep(&s->output_buf);
                     s->output_buf_size = 0;