mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +00:00
af_lavrresample: fix build on Libav
Of course, only FFmpeg has av_clipd(), while Libav does not. (Nevermind that it doesn't do much more than the mpv MPCLAMP() macro. Supposedly, libavutil can provide optimized platform-specific versions for av_clip*, but of course nothing actually does for av_clipf() or av_clipd().)
This commit is contained in:
parent
12eb8b2de8
commit
4c111fbcde
@ -432,7 +432,7 @@ static void extra_output_conversion(struct af_instance *af, struct mp_audio *mpa
|
||||
((float *)ptr)[s] = av_clipf(((float *)ptr)[s], -1.0f, 1.0f);
|
||||
} else if (af_fmt_from_planar(mpa->format) == AF_FORMAT_DOUBLE) {
|
||||
for (int s = 0; s < total; s++)
|
||||
((double *)ptr)[s] = av_clipd(((double *)ptr)[s], -1.0, 1.0);
|
||||
((double *)ptr)[s] = MPCLAMP(((double *)ptr)[s], -1.0, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user