summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-03-21 07:33:25 +0100
committerAnton Khirnov <anton@khirnov.net>2016-03-28 09:43:18 +0200
commit8229eff4b7a98ae5d85bb75f3bb072781b4a8ebe (patch)
tree4e7bfe5bd156622aa2dee181b7dc321007710ee8 /libavcodec/hevc_parser.c
parentfa936a307f5cddfc2664600157a8207ca8080af6 (diff)
h2645_parse: add a function for uninitializing the packet
Diffstat (limited to 'libavcodec/hevc_parser.c')
-rw-r--r--libavcodec/hevc_parser.c5
1 files changed, 1 insertions, 4 deletions
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);
}