[FFmpeg-devel] [PATCH 6/7] avformat/dashenc: add missing padding to the updated extradata
James Almer
jamrial at gmail.com
Tue Jul 30 23:19:49 EEST 2019
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/dashenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index bded260806..50eba370d9 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1476,12 +1476,13 @@ static int update_stream_extradata(AVFormatContext *s, OutputStream *os,
if (!extradata_size)
return 0;
- new_extradata = av_malloc(extradata_size);
+ new_extradata = av_malloc(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!new_extradata)
return AVERROR(ENOMEM);
memcpy(new_extradata, extradata, extradata_size);
+ memset(new_extradata + extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
os->ctx->streams[0]->codecpar->extradata = new_extradata;
os->ctx->streams[0]->codecpar->extradata_size = extradata_size;
--
2.22.0
More information about the ffmpeg-devel
mailing list