From 33b83d89e3720aecc60b4df3d8021cbc5780dd91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Wed, 27 Apr 2016 14:03:18 +0300 Subject: [PATCH] rtpdec_vp9: Make sure to free the temp buffer on close MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec_vp9.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/rtpdec_vp9.c b/libavformat/rtpdec_vp9.c index 71ea480056b..21809837768 100644 --- a/libavformat/rtpdec_vp9.c +++ b/libavformat/rtpdec_vp9.c @@ -279,11 +279,17 @@ static int vp9_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_vp9_ctx, return 0; } +static void vp9_close_context(PayloadContext *vp9) +{ + ffio_free_dyn_buf(&vp9->buf); +} + RTPDynamicProtocolHandler ff_vp9_dynamic_handler = { .enc_name = "VP9", .codec_type = AVMEDIA_TYPE_VIDEO, .codec_id = AV_CODEC_ID_VP9, .priv_data_size = sizeof(PayloadContext), .init = vp9_init, + .close = vp9_close_context, .parse_packet = vp9_handle_packet }; -- 2.39.2