Commit 7cb082ac authored by Mark Thompson's avatar Mark Thompson

Merge commit 'b91ce486'

* commit 'b91ce486':
  hwcontext_qsv: do not fail when download/upload VPP session creation fails
Merged-by: 's avatarMark Thompson <sw@jkqxz.net>
parents 59b1942a b91ce486
...@@ -450,8 +450,10 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx, ...@@ -450,8 +450,10 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx,
err = MFXVideoVPP_Init(*session, &par); err = MFXVideoVPP_Init(*session, &par);
if (err != MFX_ERR_NONE) { if (err != MFX_ERR_NONE) {
av_log(ctx, AV_LOG_ERROR, "Error opening the internal VPP session\n"); av_log(ctx, AV_LOG_VERBOSE, "Error opening the internal VPP session."
return AVERROR_UNKNOWN; "Surface upload/download will not be possible\n");
MFXClose(*session);
*session = NULL;
} }
return 0; return 0;
...@@ -567,6 +569,11 @@ static int qsv_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst, ...@@ -567,6 +569,11 @@ static int qsv_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
mfxSyncPoint sync = NULL; mfxSyncPoint sync = NULL;
mfxStatus err; mfxStatus err;
if (!s->session_download) {
av_log(ctx, AV_LOG_ERROR, "Surface download not possible\n");
return AVERROR(ENOSYS);
}
out.Info = in->Info; out.Info = in->Info;
out.Data.PitchLow = dst->linesize[0]; out.Data.PitchLow = dst->linesize[0];
out.Data.Y = dst->data[0]; out.Data.Y = dst->data[0];
...@@ -606,6 +613,11 @@ static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst, ...@@ -606,6 +613,11 @@ static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
mfxSyncPoint sync = NULL; mfxSyncPoint sync = NULL;
mfxStatus err; mfxStatus err;
if (!s->session_upload) {
av_log(ctx, AV_LOG_ERROR, "Surface upload not possible\n");
return AVERROR(ENOSYS);
}
in.Info = out->Info; in.Info = out->Info;
in.Data.PitchLow = src->linesize[0]; in.Data.PitchLow = src->linesize[0];
in.Data.Y = src->data[0]; in.Data.Y = src->data[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment