diff options
author | Rodeo <tdskywalker@gmail.com> | 2013-12-15 20:29:17 +0000 |
---|---|---|
committer | Rodeo <tdskywalker@gmail.com> | 2013-12-15 20:29:17 +0000 |
commit | 3111194d7a57e8435f7e502ef7cfc97f5f0e4404 (patch) | |
tree | 037cbab7b48fb0736e1a35f0b572806957457e59 /libhb/enc_qsv.c | |
parent | c193ab25bef0c3e1fa83603baa374cb2d65466ae (diff) |
QSV: avoid a hang when GopRefDist 0 is requested by the user.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5932 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r-- | libhb/enc_qsv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c index 3e54315b0..a906e6dc2 100644 --- a/libhb/enc_qsv.c +++ b/libhb/enc_qsv.c @@ -718,7 +718,8 @@ int encqsvInit(hb_work_object_t *w, hb_job_t *job) pv->param.videoParam->mfx.GopRefDist = FFMIN(pv->param.videoParam->mfx.GopRefDist, pv->param.rc.lookahead ? 8 : 16); pv->param.codingOption2.LookAheadDepth = FFMIN(pv->param.codingOption2.LookAheadDepth, - pv->param.rc.lookahead ? 48 - pv->param.videoParam->mfx.GopRefDist : 0); + pv->param.rc.lookahead ? (48 - pv->param.videoParam->mfx.GopRefDist - + 3 * !pv->param.videoParam->mfx.GopRefDist) : 0); } else { |