aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2021-03-30 16:47:39 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2021-04-06 16:52:07 +0200
commit9afde280938d319d4b630d42b309abc91e5b1eff (patch)
treefd049def39e54f5eed72c857d88b13d7d3432439 /libavformat
parent3e16d1c8a63f68b882acab980b2ecc7ce7cc14f6 (diff)
downloadffmpeg-9afde280938d319d4b630d42b309abc91e5b1eff.tar.gz
mov: Skip computing SAR from invalid display matrix elements
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c2
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(