[FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

Michael Niedermayer michael at niedermayer.cc
Sat Apr 29 04:13:11 EEST 2017


On Thu, Apr 27, 2017 at 03:08:29PM -0700, Lucas Cooper wrote:
> find_fps attempts to infer framerate from AVCodec's timebase. When this
> results in a frame rate that isn't explicitly marked as supported in
> av_timecode_check_frame_rate, find_fps returns the AVStream's
> avg_frame_rate, which, per avformat.h, _may_ be set (or not).
> 
> mov_get_mpeg2_xdcam_codec_tag, mov_get_h264_codec_tag and
> find_compressor attempt to call av_q2d on the return value of find_fps,
> which in the above case, may result in division by zero and therefore,
> an undefined frame rate when NaN is converted to int.
> ---
>  libavformat/movenc.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)

applied

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170429/76248742/attachment.sig>


More information about the ffmpeg-devel mailing list