Re: [FFmpeg-devel] [PATCH] ffmpeg: avoid possible undefined behavior

2015-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2015 at 10:39:27AM -0400, Ganesh Ajjanagadde wrote: > On lines 1633,1634 FFABS(pts) is performed. However, if av_stream_get_end_pts > returns AV_NOPTS_VALUE always, pts remains stuck at INT64_MIN, leading > to undefined behavior on FFABS. > > One could conceive of a solution using

[FFmpeg-devel] [PATCH] ffmpeg: avoid possible undefined behavior

2015-10-09 Thread Ganesh Ajjanagadde
On lines 1633,1634 FFABS(pts) is performed. However, if av_stream_get_end_pts returns AV_NOPTS_VALUE always, pts remains stuck at INT64_MIN, leading to undefined behavior on FFABS. One could conceive of a solution using FFNABS. However, such a solution has to deal with the implementation defined r