lavf: Make sure avg_frame_rate can be calculated without integer overflow
authorMartin Storsjö <martin@martin.st>
Mon, 15 Jul 2013 13:44:20 +0000 (16:44 +0300)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 24 Aug 2013 10:12:26 +0000 (12:12 +0200)
commitdc556d8bf71d7cf463fb14234707e827f790818c
tree5d03332cdd238f36b3eaecfc866eb4a2c0b3ac4a
parent7e9debb083d95db6601224ac13a4e7419528d03b
lavf: Make sure avg_frame_rate can be calculated without integer overflow

If either of the deltas is too large for the multiplications to
succeed, don't use this for setting the avg frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit e740929a071ab032ffa382e89da69c6ec7cf882c)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/utils.c