Message ID | CAF2AhNEuZhz45ghJrA0Zx=84np6B2Y5H_mzV37pNviKEcXRv8g@mail.gmail.com |
---|---|
State | Accepted |
Commit | 90b21ae5b5f8858e5af92c3e096af7ec56f17c6e |
Headers | show |
On 4/29/19, Matthias Troffaes <matthias.troffaes@gmail.com> wrote: > MSVC requires an explicit cast from void * to void when applying the > ternary conditional operator to switch between methods that return > void. The attached patch fixes the problem. > > For information, log of failed build: > > https://ci.appveyor.com/project/mcmtroffaes/ffmpeg-msvc-build/builds/24166664/job/bbeyhavgy4kmqu7k > > Kind regards, > Matthias > Applied.
On Mon, Apr 29, 2019 at 7:32 PM Paul B Mahol <onemda@gmail.com> wrote: > On 4/29/19, Matthias Troffaes <matthias.troffaes@gmail.com> wrote: > > MSVC requires an explicit cast from void * to void when applying the > > ternary conditional operator to switch between methods that return > > void. The attached patch fixes the problem. > > > > For information, log of failed build: > > > > https://ci.appveyor.com/project/mcmtroffaes/ffmpeg-msvc-build/builds/24166664/job/bbeyhavgy4kmqu7k > > > > Kind regards, > > Matthias > > > > Applied. Thanks very much, Paul! Kind regards, Matthias
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index 1ec56d72cc..bb9a23a017 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -496,7 +496,7 @@ static void set_metadata(AudioStatsContext *s, AVDictionary **metadata) #define UPDATE_STATS(planar, type, sample, normalizer_suffix, int_sample) \ if ((s->measure_overall | s->measure_perchannel) & ~MEASURE_MINMAXPEAK) { \ - UPDATE_STATS_##planar(type, update_stat(s, p, sample, sample normalizer_suffix, int_sample), s->is_float ? update_float_stat(s, p, sample) : s->is_double ? update_double_stat(s, p, sample) : NULL, ); \ + UPDATE_STATS_##planar(type, update_stat(s, p, sample, sample normalizer_suffix, int_sample), s->is_float ? update_float_stat(s, p, sample) : s->is_double ? update_double_stat(s, p, sample) : (void)NULL, ); \ } else { \ UPDATE_STATS_##planar(type, update_minmax(s, p, sample), , p->nmin = p->min normalizer_suffix; p->nmax = p->max normalizer_suffix;); \ }