Commit 6e072347 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

opus_pvq: fix crashing on analysis of mono

Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 79a26ef8
......@@ -925,7 +925,8 @@ static float pvq_band_cost(CeltPVQ *pvq, CeltFrame *f, OpusRangeCoder *rc, int b
for (i = 0; i < band_size; i++) {
err_x += (X[i] - X_orig[i])*(X[i] - X_orig[i]);
err_y += (Y[i] - Y_orig[i])*(Y[i] - Y_orig[i]);
if (Y)
err_y += (Y[i] - Y_orig[i])*(Y[i] - Y_orig[i]);
}
dist = sqrtf(err_x) + sqrtf(err_y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment