mpegencts: Fix overflow in cbr mode period calculations
authorTimo Teräs <timo.teras@iki.fi>
Sat, 28 Nov 2015 06:27:39 +0000 (08:27 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 6 Dec 2015 01:51:27 +0000 (02:51 +0100)
commitaa9ac199b8c7bf28bcd4d4ff1fc7f68e3fff5123
tree72e6ae7e655fea16db40b974e94eb6b413777d65
parentf2258e98991c392a23ad089fcbff76f972699103
mpegencts: Fix overflow in cbr mode period calculations

ts->mux_rate is int (signed 32-bit) type. The period calculations
will start to overflow when mux_rate > 5mbps. This fixes overflows
by converting first to 64-bit type.

Fixes #5044.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 64f7db554ee83846f207e82a08946a6a5a6acfe2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mpegtsenc.c