[FFmpeg-devel] [PATCH v2] mpegencts: Fix overflow in cbr mode period calculations
michaelni at gmx.at
Thu Dec 3 17:53:32 CET 2015
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 <timo.teras at iki.fi>
> Seems av_rescale() was a bit overkill, and specifying the rounding
> mode made the code uglier.. So I just added an explicit cast now.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel