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:
wm4 2015-11-26 00:25:28 +01:00
parent 12eb8b2de8
commit 4c111fbcde
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}
}