]> git.sesse.net Git - ffmpeg/commitdiff
rtpdec_vp9: Make sure to free the temp buffer on close
authorMartin Storsjö <martin@martin.st>
Wed, 27 Apr 2016 11:03:18 +0000 (14:03 +0300)
committerMartin Storsjö <martin@martin.st>
Sat, 30 Apr 2016 17:57:31 +0000 (20:57 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_vp9.c

index 71ea480056bac7849171897fcc042cedfc08d158..21809837768b7dcacc7e87a489c8bcf398c6ebf2 100644 (file)
@@ -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
 };