Commit f627a31d authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Prevent divide by 0

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=34

Change-Id: Idbcc5cf52d55b69ab0bb933828cfc88b79d9d04e
parent df9c9d6d
......@@ -243,6 +243,7 @@ static double calc_psnrhvs(const unsigned char *src, int _systride,
}
}
}
if (pixels <= 0) return 0;
ret /= pixels;
return ret;
}
......
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