Commit 1e0b6bc0 authored by James Almer's avatar 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 78b86c30.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent cebb4469
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment