[FFmpeg-devel] [PATCH] avformat/mov: simplify pasp value before setting SAR
Michael Niedermayer
michaelni at gmx.at
Wed Jan 21 03:07:10 CET 2015
This avoids a 65536:65536 SAR
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavformat/mov.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 556411f..2a9a3f7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -737,8 +737,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;
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list