From ed91c8651a874527058b8e64e8246e520f084630 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 21 Jan 2015 02:54:39 +0100 Subject: [PATCH] avformat/mov: simplify pasp value before setting SAR This avoids a 65536:65536 SAR Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 91356adbd5..050857cf8a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -749,8 +749,8 @@ static int mov_read_pasp(MOVContext *c, AVIOContext *pb, MOVAtom atom) st->sample_aspect_ratio.num, st->sample_aspect_ratio.den, num, den); } else if (den != 0) { - st->sample_aspect_ratio.num = num; - st->sample_aspect_ratio.den = den; + av_reduce(&st->sample_aspect_ratio.num, &st->sample_aspect_ratio.den, + num, den, 32767); } return 0; }