shithub: opus

Download patch

ref: 693098f6ee1783ec1f0d0390ddcb4f96663bf088
parent: d5a8136218977ef1bdcadb2c883b96106755654d
author: Jean-Marc Valin <[email protected]>
date: Mon May 28 20:35:02 EDT 2018

Avoiding arithmetic on NULL pointer

Causes a warning with -Wnull-pointer-arithmetic and the code wasn't doing
anything anyway (the ctl call ignores NULLs)

--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -2036,8 +2036,6 @@
        info.signalType = st->silk_mode.signalType;
        info.offset = st->silk_mode.offset;
        celt_encoder_ctl(celt_enc, CELT_SET_SILK_INFO(&info));
-    } else {
-       celt_encoder_ctl(celt_enc, CELT_SET_SILK_INFO((SILKInfo*)NULL));
     }
 
     /* 5 ms redundant frame for CELT->SILK */