You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
opus_pvq: fix crashing on analysis of mono
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user