diff options
author | Andriy Gelman <andriy.gelman@gmail.com> | 2019-10-14 21:45:18 -0400 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-10-14 23:59:56 -0300 |
commit | cebb446911fdc6c42d5a480b441b025c399e4a88 (patch) | |
tree | 7f9712e0517c39bfec70f88916faaa7385e6665c /libavcodec/h2645_parse.c | |
parent | 2e4f86e04ca6abdf8a1829dce210ceeef46eb224 (diff) | |
download | ffmpeg-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>
Diffstat (limited to 'libavcodec/h2645_parse.c')
-rw-r--r-- | libavcodec/h2645_parse.c | 2 |
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; |