limit decision_delay to MAX_LOOKAHEAD
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Sat, 24 Jun 2017 01:14:30 +0000 (21:14 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Sat, 24 Jun 2017 01:14:30 +0000 (21:14 -0400)
src/opusenc.c

index 1a1b385..5af189e 100644 (file)
@@ -816,6 +816,7 @@ int ope_encoder_ctl(OggOpusEnc *enc, int request, ...) {
         ret = OPE_BAD_ARG;
         break;
       }
+      value = MIN(value, MAX_LOOKAHEAD);
       enc->decision_delay = value;
     }
     break;