Message ID | 20171115074411.25325-1-lq@chinaffmpeg.org |
---|---|
State | New |
Headers | show |
On Wed, Nov 15, 2017 at 03:44:11PM +0800, Steven Liu wrote: > Signed-off-by: Steven Liu <lq@chinaffmpeg.org> > --- > libavformat/mov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Iam not sure FFABS should be used with floats the multiple evaluation in it can lead to interresting results like FFABS() being slightly negative [...]
diff --git a/libavformat/mov.c b/libavformat/mov.c index fd170baa57..e1a3e21e8d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4332,7 +4332,7 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (disp_transform[0] > 0 && disp_transform[1] > 0 && disp_transform[0] < (1<<24) && disp_transform[1] < (1<<24) && - fabs((disp_transform[0] / disp_transform[1]) - 1.0) > 0.01) + FFABS((disp_transform[0] / disp_transform[1]) - 1.0) > 0.01) st->sample_aspect_ratio = av_d2q( disp_transform[0] / disp_transform[1], INT_MAX);
Signed-off-by: Steven Liu <lq@chinaffmpeg.org> --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)