From 3111194d7a57e8435f7e502ef7cfc97f5f0e4404 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Sun, 15 Dec 2013 20:29:17 +0000 Subject: 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 --- libhb/enc_qsv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libhb') 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 { -- cgit v1.2.3