diff --git a/spa/plugins/audioconvert/resample-peaks-impl.h b/spa/plugins/audioconvert/resample-peaks-impl.h index 86cb71799..d8b28fb2b 100644 --- a/spa/plugins/audioconvert/resample-peaks-impl.h +++ b/spa/plugins/audioconvert/resample-peaks-impl.h @@ -31,7 +31,7 @@ struct peaks_data { uint32_t o_count; uint32_t i_count; - float max_f[0]; + float max_f[]; }; #if defined (HAVE_SSE) diff --git a/spa/plugins/audioconvert/resample-peaks.c b/spa/plugins/audioconvert/resample-peaks.c index b1663a3c4..9e4c4223d 100644 --- a/spa/plugins/audioconvert/resample-peaks.c +++ b/spa/plugins/audioconvert/resample-peaks.c @@ -146,7 +146,7 @@ int resample_peaks_init(struct resample *r) r->delay = impl_peaks_delay; r->in_len = impl_peaks_in_len; - d = r->data = calloc(1, sizeof(struct peaks_data) * sizeof(float) * r->channels); + d = r->data = calloc(1, sizeof(struct peaks_data) + sizeof(float) * r->channels); if (r->data == NULL) return -errno;