[vlc-devel] [PATCH] HLS: don't use floats when not necessary
Frederic YHUEL
fyhuel at viotech.net
Fri Mar 30 11:56:49 CEST 2012
2012/3/30 Rémi Denis-Courmont <remi at remlab.net>:
> On Fri, 30 Mar 2012 10:21:33 +0200, Frederic YHUEL <fyhuel at viotech.net>
> wrote:
>> BTW, I don't think we should be afraid of integer overflow here: even
>> if "unsigned int" is only 16 bytes,
>
> I don't know any platform where unsigned is 16 bytes as of yet.
>
>> there would be an overflow iff the
>> downloading of the fragment is > 65.535 seconds, which is unlikely...
>> if don't agree, I think you can amend the patch with s/unsigned
>> ms/uint32_t ms/ .
>
> Don't tell me you're trying to compile VLC for a 16-bits platform.
No no I just thought "Drat, I forgot to think about int overflow and
Hugo will not be happy" :-)
> While
> pedantically incorrect, the VLC code base, and much of contribs, generally
> assumes that int and unsigned have 32-bits or more.
>
Ok, good to know!
> In principles, the correct type would be int_least32_t and uint_least32_t.
> But that would be too verbose to the taste of normal developers.
>
Ok
Well the patch is good as is then :-)
Thanks,
--
Frédéric
More information about the vlc-devel
mailing list