[FFmpeg-cvslog] avcodec/av1_parse: simplify memset call
James Almer
git at videolan.org
Tue Oct 15 06:05:52 EEST 2019
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Oct 14 23:43:08 2019 -0300| [1e0b6bc0b4d693d2e15c0721d83ed09ac6daf458] | committer: James Almer
avcodec/av1_parse: simplify memset call
Removed (new_size - pkt->nals_allocated) because this value is always 1
during the call.
Based on commit 78b86c30d3860135042505dd4a9cbd95c4e6257d.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e0b6bc0b4d693d2e15c0721d83ed09ac6daf458
---
libavcodec/av1_parse.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/av1_parse.c b/libavcodec/av1_parse.c
index cdd524baa8..6742bc152d 100644
--- a/libavcodec/av1_parse.c
+++ b/libavcodec/av1_parse.c
@@ -71,8 +71,7 @@ int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *lo
return AVERROR(ENOMEM);
pkt->obus = tmp;
- memset(pkt->obus + pkt->obus_allocated, 0,
- (new_size - pkt->obus_allocated) * sizeof(*tmp));
+ memset(pkt->obus + pkt->obus_allocated, 0, sizeof(*pkt->obus));
pkt->obus_allocated = new_size;
}
obu = &pkt->obus[pkt->nb_obus];
More information about the ffmpeg-cvslog
mailing list