Skip to content
Snippets Groups Projects
Commit 3d197514 authored by Mark Thompson's avatar Mark Thompson
Browse files

qsvenc: Allow use of hw_device_ctx to make the internal session

parent 8848ba0b
No related branches found
No related tags found
No related merge requests found
...@@ -692,6 +692,13 @@ static int qsvenc_init_session(AVCodecContext *avctx, QSVEncContext *q) ...@@ -692,6 +692,13 @@ static int qsvenc_init_session(AVCodecContext *avctx, QSVEncContext *q)
return ret; return ret;
} }
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; q->session = q->internal_session;
} else { } else {
ret = ff_qsv_init_internal_session(avctx, &q->internal_session, ret = ff_qsv_init_internal_session(avctx, &q->internal_session,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment