diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-03-30 21:16:58 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-03-30 21:16:58 +0100 |
commit | 7cb082ac2ff0b0689d156ec5f3b54e73c0b6b744 (patch) | |
tree | cb199c81984a4308358d1977d7852a84840706cb /libavutil | |
parent | 59b1942aae47ce56511a3e11e99a5d42d6becfe2 (diff) | |
parent | b91ce4860054430d3712deb0d9487cac2fcb7d68 (diff) | |
download | ffmpeg-streaming-7cb082ac2ff0b0689d156ec5f3b54e73c0b6b744.zip ffmpeg-streaming-7cb082ac2ff0b0689d156ec5f3b54e73c0b6b744.tar.gz |
Merge commit 'b91ce4860054430d3712deb0d9487cac2fcb7d68'
* commit 'b91ce4860054430d3712deb0d9487cac2fcb7d68':
hwcontext_qsv: do not fail when download/upload VPP session creation fails
Merged-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_qsv.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 5eb974e..15baa6a 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -450,8 +450,10 @@ static int qsv_init_internal_session(AVHWFramesContext *ctx, err = MFXVideoVPP_Init(*session, &par); if (err != MFX_ERR_NONE) { - av_log(ctx, AV_LOG_ERROR, "Error opening the internal VPP session\n"); - return AVERROR_UNKNOWN; + av_log(ctx, AV_LOG_VERBOSE, "Error opening the internal VPP session." + "Surface upload/download will not be possible\n"); + MFXClose(*session); + *session = NULL; } return 0; @@ -567,6 +569,11 @@ static int qsv_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst, mfxSyncPoint sync = NULL; 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.Data.PitchLow = dst->linesize[0]; out.Data.Y = dst->data[0]; @@ -606,6 +613,11 @@ static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst, mfxSyncPoint sync = NULL; 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.Data.PitchLow = src->linesize[0]; in.Data.Y = src->data[0]; |