]> granicus.if.org Git - handbrake/commitdiff
QSV: param check: LA should be within range
authorhandbrake <no-reply@handbrake.fr>
Tue, 6 Aug 2013 14:05:24 +0000 (14:05 +0000)
committerhandbrake <no-reply@handbrake.fr>
Tue, 6 Aug 2013 14:05:24 +0000 (14:05 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5693 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/enc_qsv.c

index 57c1f0851d8b72bb17d4e67466c7ce692ac7de55..38dafd5b98063c425a15bcbb688919233b4a25cd 100644 (file)
@@ -494,7 +494,7 @@ int qsv_enc_init(av_qsv_context *qsv, hb_work_private_t *pv)
 
     if (hb_qsv_info->capabilities & HB_QSV_CAP_OPTION2_LOOKAHEAD)
         if ((entry = hb_dict_get(qsv_opts_dict, QSV_NAME_lookaheaddepth)) != NULL && entry->value != NULL)
-            pv->la_depth = atoi(entry->value);
+            pv->la_depth = HB_QSV_CLIP3(11,50, atoi(entry->value)); // range of: >10 and <=50
         else
             pv->la_depth = 40; // default: value