summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-26 00:25:28 +0100
committerwm4 <wm4@nowhere>2015-11-26 00:25:28 +0100
commit4c111fbcde6abe9ce4fab0f1e7fcef384efcc4e5 (patch)
tree296d23507169b1c4e6ea63bb1acbee07e123ff73 /audio
parent12eb8b2de8b0ce5a9c45dbcdf3befc5075a35c98 (diff)
downloadmpv-4c111fbcde6abe9ce4fab0f1e7fcef384efcc4e5.tar.bz2
mpv-4c111fbcde6abe9ce4fab0f1e7fcef384efcc4e5.tar.xz
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().)
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_lavrresample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 21f31af8f9..f7f448cad0 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -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);
}
}
}