summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-21 02:54:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-03 14:11:20 +0100
commited91c8651a874527058b8e64e8246e520f084630 (patch)
treeb1765869c5051ac808c716205a4b31440ccf8065 /libavformat
parentfc35df893175cedd65c14a4f7ebab6f33aeae4a6 (diff)
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.c4
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;
}