[FFmpeg-devel] [PATCH] fftools/ffprobe: Avoid overflow when calculating DAR
Michael Niedermayer
michael at niedermayer.cc
Sat May 4 02:13:46 EEST 2024
On Fri, May 03, 2024 at 05:36:23PM +0100, Derek Buitenhuis wrote:
> Both the codecpar's width and height, and the SAR num and den are
> ints, which can overflow. Cast to int64_t, which is what av_reduce
> takes.
>
> Without this, occasionally, display_aspect_ratio can be negative in
> ffprobe's -show_stream output.
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> fftools/ffprobe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
LGTM
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240504/23892bb6/attachment.sig>
More information about the ffmpeg-devel
mailing list