lavc/qsv: fix a memory leak in ff_qsv_set_display_handle()
authorZhong Li <zhong.li@intel.com>
Sun, 29 Sep 2019 08:01:06 +0000 (16:01 +0800)
committerZhong Li <zhong.li@intel.com>
Tue, 8 Oct 2019 02:25:01 +0000 (10:25 +0800)
Reported-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
libavcodec/qsv.c

index 994c9eb..a43f0d5 100644 (file)
@@ -838,6 +838,8 @@ int ff_qsv_close_internal_session(QSVSession *qs)
     if (qs->va_device_ctx) {
         qs->va_device_ctx->free(qs->va_device_ctx);
     }
+
+    av_buffer_unref(&qs->va_device_ref);
 #endif
     return 0;
 }