mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
opus_pvq: fix crashing on analysis of mono
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
79a26ef802
commit
6e0723470b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user