From 8229eff4b7a98ae5d85bb75f3bb072781b4a8ebe Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 21 Mar 2016 07:33:25 +0100 Subject: h2645_parse: add a function for uninitializing the packet --- libavcodec/h2645_parse.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavcodec/h2645_parse.c') diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c index 794c954597..0064b7d489 100644 --- a/libavcodec/h2645_parse.c +++ b/libavcodec/h2645_parse.c @@ -226,3 +226,12 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, return 0; } + +void ff_h2645_packet_uninit(H2645Packet *pkt) +{ + int i; + for (i = 0; i < pkt->nals_allocated; i++) + av_freep(&pkt->nals[i].rbsp_buffer); + av_freep(&pkt->nals); + pkt->nals_allocated = 0; +} -- cgit v1.2.3