qsv/vp8dec: fixes memory leak issue
authorLi, Zhong <zhong.li@intel.com>
Thu, 7 Dec 2017 07:26:38 +0000 (15:26 +0800)
committerMaxym Dmytrychenko <maxim.d33@gmail.com>
Tue, 12 Dec 2017 12:59:13 +0000 (13:59 +0100)
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
libavcodec/qsvdec_other.c

index 3ea1859..97a7635 100644 (file)
@@ -60,6 +60,11 @@ static av_cold int qsv_decode_close(AVCodecContext *avctx)
 {
     QSVOtherContext *s = avctx->priv_data;
 
+#if CONFIG_VP8_QSV_DECODER
+    if (avctx->codec_id == AV_CODEC_ID_VP8)
+        av_freep(&s->qsv.load_plugins);
+#endif
+
     ff_qsv_decode_close(&s->qsv);
 
     qsv_clear_buffers(s);