summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-06-20 16:02:10 +0200
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-06-20 16:09:09 +0200
commit0ea58059d635484957b332fe9432351381fae6cd (patch)
treeb279eff229ef626f63a3167397079fe329e5bced /libavcodec/h264_parser.c
parentacfab2dce6d30ab30b953d10e2e0097d8f8cb29f (diff)
downloadffmpeg-0ea58059d635484957b332fe9432351381fae6cd.tar.gz
lavc/h264_ps: add ff_h264_ps_uninit and use it
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c8
1 files changed, 1 insertions, 7 deletions
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)