diff options
author | James Almer <jamrial@gmail.com> | 2017-11-11 15:24:08 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-11 15:24:08 -0300 |
commit | 1a24d4f020ee52154d2b369d6fc3d5056b5719c8 (patch) | |
tree | cb1833b78332d6f400ed4d960e4b2ca5043b63d0 | |
parent | 8c82c4d25d363eca035f2c23e8257c1d4c7a20d3 (diff) | |
parent | ea25ccd1b2a980df8d43cc1f86a23e3c094090a6 (diff) | |
download | ffmpeg-1a24d4f020ee52154d2b369d6fc3d5056b5719c8.tar.gz |
Merge commit 'ea25ccd1b2a980df8d43cc1f86a23e3c094090a6'
* commit 'ea25ccd1b2a980df8d43cc1f86a23e3c094090a6':
qsv: Join the derived session to the parent
Merged-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/qsv.c | 5 | ||||
-rw-r--r-- | libavfilter/qsvvpp.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 5180eb8771..250b4e61e3 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -593,6 +593,11 @@ int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, "Error setting a HW handle"); } + err = MFXJoinSession(parent_session, session); + if (err != MFX_ERR_NONE) + return ff_qsv_print_error(avctx, err, + "Error joining session"); + ret = qsv_load_plugins(session, load_plugins, avctx); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Error loading plugins\n"); diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 37805f2323..f32b46dcc0 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -515,6 +515,9 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s) if (ret != MFX_ERR_NONE) return AVERROR_UNKNOWN; } + ret = MFXJoinSession(device_hwctx->session, s->session); + if (ret != MFX_ERR_NONE) + return AVERROR_UNKNOWN; if (IS_OPAQUE_MEMORY(s->in_mem_mode) || IS_OPAQUE_MEMORY(s->out_mem_mode)) { s->opaque_alloc.In.Surfaces = s->surface_ptrs_in; |