Revision 27ee9bcf libavcodec/ra144.c

View differences:

libavcodec/ra144.c
174 174
    memcpy(statbuf, work + 40, 20);
175 175
}
176 176

  
177
static unsigned int rms(const int *data, int f, RA144Context *ractx)
177
static unsigned int rms(const int *data, int f)
178 178
{
179 179
    int x;
180 180
    unsigned int res = 0x10000;
......
186 186
        if (res == 0)
187 187
            return 0;
188 188

  
189
        if (res > 0x10000) {
190
            av_log(ractx, AV_LOG_ERROR, "Overflow. Broken sample?\n");
191
            return 0;
192
        }
193

  
194 189
        while (res <= 0x3fff) {
195 190
            b++;
196 191
            res <<= 2;
......
319 314
        // coefficients
320 315
        if (copynew) {
321 316
            int_to_int16(decsp, ractx->lpc_coef);
322
            return rms(ractx->lpc_refl, energy, ractx);
317
            return rms(ractx->lpc_refl, energy);
323 318
        } else {
324 319
            int_to_int16(decsp, ractx->lpc_coef_old);
325
            return rms(ractx->lpc_refl_old, energy, ractx);
320
            return rms(ractx->lpc_refl_old, energy);
326 321
        }
327 322
    } else {
328
        return rms(work, energy, ractx);
323
        return rms(work, energy);
329 324
    }
330 325
}
331 326

  
......
363 358
    refl_rms[1] = interp(ractx, block_coefs[1], 1, energy > ractx->old_energy,
364 359
                    t_sqrt(energy*ractx->old_energy) >> 12);
365 360
    refl_rms[2] = interp(ractx, block_coefs[2], 2, 1, energy);
366
    refl_rms[3] = rms(ractx->lpc_refl, energy, ractx);
361
    refl_rms[3] = rms(ractx->lpc_refl, energy);
367 362

  
368 363
    int_to_int16(block_coefs[3], ractx->lpc_coef);
369 364

  

Also available in: Unified diff