summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/hevc_parser.c')
-rw-r--r--libavcodec/hevc_parser.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index 71887a8e91..458a2ebd61 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -472,12 +472,7 @@ static void hevc_parser_close(AVCodecParserContext *s)
ctx->ps.sps = NULL;
- for (i = 0; i < ctx->pkt.nals_allocated; i++) {
- av_freep(&ctx->pkt.nals[i].rbsp_buffer);
- av_freep(&ctx->pkt.nals[i].skipped_bytes_pos);
- }
- av_freep(&ctx->pkt.nals);
- ctx->pkt.nals_allocated = 0;
+ ff_h2645_packet_uninit(&ctx->pkt);
av_freep(&ctx->pc.buffer);
}