diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-27 10:06:27 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-10-05 00:48:47 +0200 |
commit | c9ceec1f1fdd7d705961c0fb3247567cbdc3deb5 (patch) | |
tree | 1b26b70ca9962f2ff054bae3bfe0232df0dea9e7 | |
parent | e6cdd23bc706d6ff0e213ffbf537e92c81637769 (diff) | |
download | ffmpeg-c9ceec1f1fdd7d705961c0fb3247567cbdc3deb5.tar.gz |
avcodec/qsv: Fix leak of options on error
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavcodec/qsv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 7816d2f93c..6e3154e1a3 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -361,6 +361,7 @@ static int ff_qsv_set_display_handle(AVCodecContext *avctx, QSVSession *qs) av_dict_set(&child_device_opts, "driver", "iHD", 0); ret = av_hwdevice_ctx_create(&qs->va_device_ref, AV_HWDEVICE_TYPE_VAAPI, NULL, child_device_opts, 0); + av_dict_free(&child_device_opts); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Failed to create a VAAPI device.\n"); return ret; @@ -375,8 +376,6 @@ static int ff_qsv_set_display_handle(AVCodecContext *avctx, QSVSession *qs) } } - av_dict_free(&child_device_opts); - return 0; } #endif //AVCODEC_QSV_LINUX_SESSION_HANDLE |