mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-13 02:34:54 +00:00
ffv1: avoid checking a double for equality
if 0.0 != 0.0 a out of array read would occur, equal checks with floating point may behave in such odd ways, though this is very unlikely in a real implementation of a compiler Fixes: CID718936 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d2a618ab22
commit
54b2d317ed
@ -275,7 +275,7 @@ static void find_best_state(uint8_t best_state[256][256], const uint8_t one_stat
|
|||||||
occ[j]=1.0;
|
occ[j]=1.0;
|
||||||
for(k=0; k<256; k++){
|
for(k=0; k<256; k++){
|
||||||
double newocc[256]={0};
|
double newocc[256]={0};
|
||||||
for(m=0; m<256; m++){
|
for(m=1; m<256; m++){
|
||||||
if(occ[m]){
|
if(occ[m]){
|
||||||
len -=occ[m]*( p *l2tab[ m]
|
len -=occ[m]*( p *l2tab[ m]
|
||||||
+ (1-p)*l2tab[256-m]);
|
+ (1-p)*l2tab[256-m]);
|
||||||
|
Loading…
Reference in New Issue
Block a user