avutil/hwcontext_qsv: Fix mixed declaration and code

Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-03-24 21:29:44 +01:00
parent ecdc94b97f
commit 1f1b773859
1 changed files with 2 additions and 2 deletions

View File

@ -1121,7 +1121,8 @@ fail:
static int qsv_init_internal_session(AVHWFramesContext *ctx, static int qsv_init_internal_session(AVHWFramesContext *ctx,
mfxSession *session, int upload) mfxSession *session, int upload)
{ {
AVQSVFramesContext *frames_hwctx = ctx->hwctx; QSVFramesContext *s = ctx->hwctx;
AVQSVFramesContext *frames_hwctx = &s->p;
QSVDeviceContext *device_priv = ctx->device_ctx->hwctx; QSVDeviceContext *device_priv = ctx->device_ctx->hwctx;
AVQSVDeviceContext *hwctx = &device_priv->p; AVQSVDeviceContext *hwctx = &device_priv->p;
int opaque = 0; int opaque = 0;
@ -1153,7 +1154,6 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx,
} }
#if QSV_HAVE_OPAQUE #if QSV_HAVE_OPAQUE
QSVFramesContext *s = ctx->hwctx;
opaque = !!(frames_hwctx->frame_type & MFX_MEMTYPE_OPAQUE_FRAME); opaque = !!(frames_hwctx->frame_type & MFX_MEMTYPE_OPAQUE_FRAME);
#endif #endif