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_parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libavcodec/hevc_parser.c') diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index 20eae54e79..5c1fbc31d5 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -227,10 +227,7 @@ static void hevc_parser_close(AVCodecParserContext *s) for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.pps_list); i++) av_buffer_unref(&ctx->ps.pps_list[i]); - for (i = 0; i < ctx->pkt.nals_allocated; i++) - av_freep(&ctx->pkt.nals[i].rbsp_buffer); - av_freep(&ctx->pkt.nals); - ctx->pkt.nals_allocated = 0; + ff_h2645_packet_uninit(&ctx->pkt); av_freep(&ctx->pc.buffer); } -- cgit v1.2.3