mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
qsvenc: Allow use of hw_device_ctx to make the internal session
(cherry picked from commit 3d197514e613ccd9eab43180c0a7c8b09a307606)
This commit is contained in:
parent
8aa3c2df1a
commit
28aedeed19
@ -699,6 +699,13 @@ static int qsvenc_init_session(AVCodecContext *avctx, QSVEncContext *q)
|
||||
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;
|
||||
} else {
|
||||
ret = ff_qsv_init_internal_session(avctx, &q->internal_session,
|
||||
|
Loading…
x
Reference in New Issue
Block a user