[vlc-devel] [RFC] signed versus unsigned integer types
Rafaël Carré
funman at videolan.org
Tue Jan 29 15:13:48 CET 2008
Le Sun, 27 Jan 2008 10:07:58 +0100,
Jean-Paul Saman <jean-paul.saman at planet.nl> a écrit :
> I think it is good that someone looks into signed vs unsigned usage
> in vlc.
I've got a patch pending which use unsigned types in:
src/input
modules/{access,access_output,demux,access_filter,codec}
Before committing it, I will send you the exact description of what it
does, but first I need to solve a simple issue:
Why is mtime_t a signed type ?
What is a negative date ? (answer: nothing)
from vlc_common.h: typedef int64_t mtime_t;
from vlc_mtime.h: #define LAST_MDATE ((mtime_t)((uint64_t)(-1)/2))
which could be changed to UINT64_MAX (0xffffffffffffffffULL)
I don't see any reason for a date to be signed, but it is used so much
in various demuxers, that maybe there is a reason I fail to see.
Thanks
--
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080129/f0a20509/attachment.sig>
More information about the vlc-devel
mailing list