Commit cebb4469 authored by Andriy Gelman's avatar Andriy Gelman Committed by James Almer

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: 's avatarJames Almer <jamrial@gmail.com>
parent 2e4f86e0
......@@ -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;
......
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