[FFmpeg-devel] On signedness of AV_NOPTS_VALUE constant

Andrey Utkin andrey.krieger.utkin at gmail.com
Wed Sep 19 10:18:24 CEST 2012


2012/9/18 Reimar Döffinger <Reimar.Doeffinger at gmx.de>:
> I guess it is strange, but the 0x8... constant does not fit into int64_t, so I think trying to put it into that invokes undefined behaviour.

This point is valid. Decreasing this constant makes warning disappear.
Although applying minus sign doesn't remove the warning.

> I think it should be defined as INT64_C(-0x8000000000000000) which in practice should give the same value but avoid the undefined aspect.

Didn't make difference for me, but implicit casting did:
(int64_t)INT64_C(0x8000000000000000)

-- 
Andrey Utkin


More information about the ffmpeg-devel mailing list