summaryrefslogtreecommitdiffstats
path: root/libhb/enc_qsv.c
diff options
context:
space:
mode:
authormaxd <[email protected]>2016-03-30 16:14:38 +0200
committermaxd <[email protected]>2016-03-30 17:14:35 +0200
commit78ac5d119bfa65d1a1611c94bd66152a4c995bff (patch)
tree8f0a6892c751f3c1f2ed9db7279d754892de2d30 /libhb/enc_qsv.c
parentcc618a4e2f435690f420a77c81ba8660f8fa4dc6 (diff)
QSV: better compatibility with recent SW lib
To avoid having max_async_depth == 0 with recent MSDK SW library, this would help to allocate properly internal resources and to avoid crash during encode
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r--libhb/enc_qsv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 87a180629..48e4c845e 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -1404,7 +1404,8 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job)
}
// AsyncDepth has now been set and/or modified by Media SDK
- pv->max_async_depth = videoParam.AsyncDepth;
+ // fall back to default if zero
+ pv->max_async_depth = videoParam.AsyncDepth ? videoParam.AsyncDepth : AV_QSV_ASYNC_DEPTH_DEFAULT;
pv->async_depth = 0;
return 0;