[FFmpeg-devel] [PATCH 1/3] 4xm: prevent overflow during bit rate calculation
andreas.cadhalpun at googlemail.com
Thu Dec 15 02:11:48 EET 2016
On 14.12.2016 02:46, Ronald S. Bultje wrote:
> Not wanting to discourage you, but I wonder if there's really a point to
These patches are prerequisites for enforcing the validity of codec
> I don't see how the user experience changes.
Users won't see ffmpeg claiming nonsense bit rates like -1184293205235990 kb/s
> This isn't specifically intended at this patch, but rather at the sort of
> rabbit hole this change might lead to,
I have a pretty good map of this rabbit hole (i.e. lots of samples triggering
UBSan errors) and one day I might try to dig it up, but for now I'm limiting
myself to the codec parameters.
> which would cause the code to be uber-full of such checks, none of which
> really have any significance. But maybe others disagree...
Not relying on undefined behavior is a significant improvement. And doing
these checks consequently where the values are set makes it possible
for other code to rely on their validity without further checks.
More information about the ffmpeg-devel