static uint64_t phi_at(struct ws_interval *in, int64_t ts)
{
- uint64_t dt = ts - in->ts_start;
+ uint64_t dt = ts - (uint64_t)in->ts_start;
uint64_t dt2 = dt & 1 ? /* dt * (dt - 1) / 2 without overflow */
dt * ((dt - 1) >> 1) : (dt >> 1) * (dt - 1);
return in->phi0 + dt * in->dphi0 + dt2 * in->ddphi;
return 0;
}
-AVCodec ff_ffwavesynth_decoder = {
+const AVCodec ff_ffwavesynth_decoder = {
.name = "wavesynth",
.long_name = NULL_IF_CONFIG_SMALL("Wave synthesis pseudo-codec"),
.type = AVMEDIA_TYPE_AUDIO,
.close = wavesynth_close,
.decode = wavesynth_decode,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};