Re: [FFmpeg-devel] [PATCH v2] mpegencts: Fix overflow in cbr mode period calculations

2015-12-03 Thread Michael Niedermayer
On Sat, Nov 28, 2015 at 08:27:39AM +0200, Timo Teräs wrote: > 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 > --- > Seems

[FFmpeg-devel] [PATCH v2] mpegencts: Fix overflow in cbr mode period calculations

2015-11-28 Thread Timo Teräs
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 --- Seems av_rescale() was a bit overkill, and specifying the rounding mode made the cod