ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Thu Apr 29 23:44:27 2021 +0200| [7a57c5ab915a26afd03447ba130cf88c5f8dca77] | 
committer: Andreas Rheinhardt

avcodec/omx: Zero packet padding

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

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

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

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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to