diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2021-03-30 16:47:39 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2021-04-06 16:52:07 +0200 |
commit | 9afde280938d319d4b630d42b309abc91e5b1eff (patch) | |
tree | fd049def39e54f5eed72c857d88b13d7d3432439 /libavformat | |
parent | 3e16d1c8a63f68b882acab980b2ecc7ce7cc14f6 (diff) | |
download | ffmpeg-9afde280938d319d4b630d42b309abc91e5b1eff.tar.gz |
mov: Skip computing SAR from invalid display matrix elements
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 8d19824910..43c55ef4a4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4620,7 +4620,7 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) disp_transform[i] = hypot(sc->display_matrix[0 + i], sc->display_matrix[3 + i]); - if (disp_transform[0] > 0 && disp_transform[1] > 0 && + if (disp_transform[0] > 1 && disp_transform[1] > 1 && disp_transform[0] < (1<<24) && disp_transform[1] < (1<<24) && fabs((disp_transform[0] / disp_transform[1]) - 1.0) > 0.01) st->sample_aspect_ratio = av_d2q( |