summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-04-27 14:03:18 +0300
committerThomas Volkert <thomas@netzeal.de>2016-06-14 08:00:17 +0200
commit03aa4cd22b4b1522260355c499729c08ce640732 (patch)
tree4d5c79d104bad41756ac1e2fd40b7fcdf812a4fc
parent228568fc8ac428c57e0898cd24134724c9fb3d42 (diff)
downloadffmpeg-03aa4cd22b4b1522260355c499729c08ce640732.tar.gz
rtpdec_vp9: Make sure to free the temp buffer on close
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/rtpdec_vp9.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rtpdec_vp9.c b/libavformat/rtpdec_vp9.c
index e50bedea32..7b1c38f63b 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
};