[FFmpeg-devel] Fix undefined behavior in ff_configure_buffers_for_index()

Dale Curtis dalecurtis at chromium.org
Thu Jan 30 21:23:07 EET 2020


On Wed, Jan 29, 2020 at 10:23 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:

> so i think it works but maybe ive missed something, for which values
> of e2_pts do you see a problem with e1_pts = INT64_MIN?
>

For e1_pts = INT64_MIN and e2_pts >= 0 you end up with a negative int64_t
result for e2_pts - (uint64_t)e1_pts, so it's always < time_tolerance. If
that's what you intended, then sgtm.

- dale


More information about the ffmpeg-devel mailing list