From 0ea58059d635484957b332fe9432351381fae6cd Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 20 Jun 2016 16:02:10 +0200 Subject: lavc/h264_ps: add ff_h264_ps_uninit and use it --- libavcodec/h264_parser.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libavcodec/h264_parser.c') diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 3ce049ee56..42ad932a68 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -649,17 +649,11 @@ static void h264_close(AVCodecParserContext *s) { H264ParseContext *p = s->priv_data; ParseContext *pc = &p->pc; - int i; av_freep(&pc->buffer); ff_h264_sei_uninit(&p->sei); - - for (i = 0; i < FF_ARRAY_ELEMS(p->ps.sps_list); i++) - av_buffer_unref(&p->ps.sps_list[i]); - - for (i = 0; i < FF_ARRAY_ELEMS(p->ps.pps_list); i++) - av_buffer_unref(&p->ps.pps_list[i]); + ff_h264_ps_uninit(&p->ps); } static av_cold int init(AVCodecParserContext *s) -- cgit v1.2.3