summaryrefslogtreecommitdiffstats
path: root/libavcodec/av1_parse.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-10-14 23:43:08 -0300
committerJames Almer <jamrial@gmail.com>2019-10-15 00:00:02 -0300
commit1e0b6bc0b4d693d2e15c0721d83ed09ac6daf458 (patch)
tree20a1a61f1df8bc2f28202a7cb6ee32a699171d53 /libavcodec/av1_parse.c
parentcebb446911fdc6c42d5a480b441b025c399e4a88 (diff)
downloadffmpeg-streaming-1e0b6bc0b4d693d2e15c0721d83ed09ac6daf458.zip
ffmpeg-streaming-1e0b6bc0b4d693d2e15c0721d83ed09ac6daf458.tar.gz
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@gmail.com>
Diffstat (limited to 'libavcodec/av1_parse.c')
-rw-r--r--libavcodec/av1_parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/av1_parse.c b/libavcodec/av1_parse.c
index cdd524b..6742bc1 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];
OpenPOWER on IntegriCloud