aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2019-10-14 21:45:18 -0400
committerJames Almer <jamrial@gmail.com>2019-10-14 23:59:56 -0300
commitcebb446911fdc6c42d5a480b441b025c399e4a88 (patch)
tree7f9712e0517c39bfec70f88916faaa7385e6665c
parent2e4f86e04ca6abdf8a1829dce210ceeef46eb224 (diff)
downloadffmpeg-cebb446911fdc6c42d5a480b441b025c399e4a88.tar.gz
avcodec/h2645_parse: Reset nal_buffer_size on uninit
Without reseting nal_buffer_size, av_fast_realloc will fail if ff_h2645_packet_split is called with the unitialized pkt as argument. Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/h2645_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index b1dba3d510..4808f79a67 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -524,7 +524,7 @@ void ff_h2645_packet_uninit(H2645Packet *pkt)
av_freep(&pkt->nals[i].skipped_bytes_pos);
}
av_freep(&pkt->nals);
- pkt->nals_allocated = 0;
+ pkt->nals_allocated = pkt->nal_buffer_size = 0;
if (pkt->rbsp.rbsp_buffer_ref) {
av_buffer_unref(&pkt->rbsp.rbsp_buffer_ref);
pkt->rbsp.rbsp_buffer = NULL;