]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ffwavesynth.c
avformat: Constify all muxer/demuxers
[ffmpeg] / libavcodec / ffwavesynth.c
index c99bac90eaffea3093851f31d0ea46aced77051f..a1211facb91addbe293af9274e0908d61e54525c 100644 (file)
@@ -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,
 };