[FFmpeg-cvslog] mov: Skip computing SAR from invalid display matrix elements

Vittorio Giovara git at videolan.org
Tue Apr 6 18:09:34 EEST 2021


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Tue Mar 30 16:47:39 2021 +0200| [9afde280938d319d4b630d42b309abc91e5b1eff] | committer: Vittorio Giovara

mov: Skip computing SAR from invalid display matrix elements

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9afde280938d319d4b630d42b309abc91e5b1eff
---

 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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(



More information about the ffmpeg-cvslog mailing list