X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fffwavesynth.c;h=a1211facb91addbe293af9274e0908d61e54525c;hb=bc70684e74a185d7b80c8b80bdedda659cb581b8;hp=c99bac90eaffea3093851f31d0ea46aced77051f;hpb=01506c290adb6d033e0167b95e52d37bc5ceedeb;p=ffmpeg diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index c99bac90eaf..a1211facb91 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c @@ -188,7 +188,7 @@ static uint64_t frac64(uint64_t a, uint64_t b) 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; @@ -459,7 +459,7 @@ static av_cold int wavesynth_close(AVCodecContext *avc) 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, @@ -469,5 +469,5 @@ AVCodec ff_ffwavesynth_decoder = { .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, };