[FFmpeg-cvslog] avformat/mov: fix avg_frame_rate calculation
Michael Niedermayer
git at videolan.org
Sun Feb 16 19:15:41 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Feb 16 19:05:49 2014 +0100| [05e9e3342fe10483458b456e9111537f07c1ce22] | committer: Michael Niedermayer
avformat/mov: fix avg_frame_rate calculation
Fixes integer overflow
Fixes Ticket3390
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05e9e3342fe10483458b456e9111537f07c1ce22
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 85f5f83..834969a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3419,7 +3419,7 @@ static int mov_read_header(AVFormatContext *s)
}
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && sc->nb_frames_for_fps > 0 && sc->duration_for_fps > 0)
av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
- sc->time_scale*sc->nb_frames_for_fps, sc->duration_for_fps, INT_MAX);
+ sc->time_scale*(int64_t)sc->nb_frames_for_fps, sc->duration_for_fps, INT_MAX);
}
if (mov->trex_data) {
More information about the ffmpeg-cvslog
mailing list