mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-05 06:40:03 +00:00
vf_idet: reorder operations to avoid division by 0
Fixes CID733738 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0fa26bd470
commit
31fdf3065d
@ -118,11 +118,11 @@ static void filter(AVFilterContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (alpha[0] / (float)alpha[1] > idet->interlace_threshold){
|
||||
if (alpha[0] > idet->interlace_threshold * alpha[1]){
|
||||
type = TFF;
|
||||
}else if(alpha[1] / (float)alpha[0] > idet->interlace_threshold){
|
||||
}else if(alpha[1] > idet->interlace_threshold * alpha[0]){
|
||||
type = BFF;
|
||||
}else if(alpha[1] / (float)delta > idet->progressive_threshold){
|
||||
}else if(alpha[1] > idet->progressive_threshold * delta){
|
||||
type = PROGRSSIVE;
|
||||
}else{
|
||||
type = UNDETERMINED;
|
||||
|
Loading…
Reference in New Issue
Block a user