shithub: opus

Download patch

ref: ed921b01bcbe65fabe853607630866af81bc5da5
parent: 32af90ae65a0ad5dbef9502ded2c5d9f48be18f7
author: Gregory Maxwell <[email protected]>
date: Sun Oct 2 16:04:28 EDT 2011

Make it possible to undo the effect of the private OPUS_SET_FORCE_MODE encoder ctl.

--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1242,7 +1242,7 @@
         case OPUS_SET_FORCE_MODE_REQUEST:
         {
             opus_int32 value = va_arg(ap, opus_int32);
-            if (value < MODE_SILK_ONLY || value > MODE_CELT_ONLY)
+            if ((value < MODE_SILK_ONLY || value > MODE_CELT_ONLY) && value != OPUS_AUTO)
                goto bad_arg;
             st->user_forced_mode = value;
         }