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>
Thu, 3 Dec 2015 16:43:30 +0000 (17:43 +0100)
commit64f7db554ee83846f207e82a08946a6a5a6acfe2
tree707a18bd87f416dcd9a458e659b528228660409b
parentfff7f2df31e942edd33287a3570466ebb9f91811
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>
libavformat/mpegtsenc.c