diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-21 02:54:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-03 14:11:20 +0100 |
commit | ed91c8651a874527058b8e64e8246e520f084630 (patch) | |
tree | b1765869c5051ac808c716205a4b31440ccf8065 /libavformat | |
parent | fc35df893175cedd65c14a4f7ebab6f33aeae4a6 (diff) | |
download | ffmpeg-ed91c8651a874527058b8e64e8246e520f084630.tar.gz |
avformat/mov: simplify pasp value before setting SAR
This avoids a 65536:65536 SAR
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 4 |
1 files 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; } |