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/hevc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libavcodec/hevc.c') diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 69c4f26aa6..72dea5a589 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2798,10 +2798,7 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) for (i = 0; i < FF_ARRAY_ELEMS(s->ps.pps_list); i++) av_buffer_unref(&s->ps.pps_list[i]); - for (i = 0; i < s->pkt.nals_allocated; i++) - av_freep(&s->pkt.nals[i].rbsp_buffer); - av_freep(&s->pkt.nals); - s->pkt.nals_allocated = 0; + ff_h2645_packet_uninit(&s->pkt); return 0; } -- cgit v1.2.3