[FFmpeg-cvslog] avformat/mov: simplify pasp value before setting SAR

Michael Niedermayer git at videolan.org
Tue Feb 3 14:26:57 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 21 02:54:39 2015 +0100| [ed91c8651a874527058b8e64e8246e520f084630] | committer: Michael Niedermayer

avformat/mov: simplify pasp value before setting SAR

This avoids a 65536:65536 SAR

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mov.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 91356ad..050857c 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;
 }



More information about the ffmpeg-cvslog mailing list