From 4c111fbcde6abe9ce4fab0f1e7fcef384efcc4e5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 26 Nov 2015 00:25:28 +0100 Subject: 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().) --- audio/filter/af_lavrresample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') 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); } } } -- cgit v1.2.3