--- libavcodec/qsvenc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index b2f2b4db7..bd8c24321 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -693,6 +693,13 @@ static int qsvenc_init_session(AVCodecContext *avctx, QSVEncContext *q) } q->session = q->internal_session; + } else if (avctx->hw_device_ctx) { + ret = ff_qsv_init_session_device(avctx, &q->internal_session, + avctx->hw_device_ctx, q->load_plugins); + if (ret < 0) + return ret; + + q->session = q->internal_session; } else { ret = ff_qsv_init_internal_session(avctx, &q->internal_session, q->load_plugins); -- 2.11.0
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel