summaryrefslogtreecommitdiffstats
path: root/libavcodec/h2645_parse.c
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2019-09-07 15:55:51 -0400
committerJames Almer <jamrial@gmail.com>2019-09-11 10:23:26 -0300
commit78b86c30d3860135042505dd4a9cbd95c4e6257d (patch)
tree26b9a512e3e3a106bb220bb04012ca19b87c023b /libavcodec/h2645_parse.c
parent783ea9c1c519bad80d4f816698ff6dde735afd36 (diff)
downloadffmpeg-streaming-78b86c30d3860135042505dd4a9cbd95c4e6257d.zip
ffmpeg-streaming-78b86c30d3860135042505dd4a9cbd95c4e6257d.tar.gz
avcodec/h2645_parse: simplify memset call
Removed (new_size - pkt->nals_allocated) because this value is always 1 during the call. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h2645_parse.c')
-rw-r--r--libavcodec/h2645_parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 307e864..ef6a6b4 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -461,8 +461,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
return AVERROR(ENOMEM);
pkt->nals = tmp;
- memset(pkt->nals + pkt->nals_allocated, 0,
- (new_size - pkt->nals_allocated) * sizeof(*pkt->nals));
+ memset(pkt->nals + pkt->nals_allocated, 0, sizeof(*pkt->nals));
nal = &pkt->nals[pkt->nb_nals];
nal->skipped_bytes_pos_size = 1024; // initial buffer size
OpenPOWER on IntegriCloud