[FFmpeg-devel] [PATCH 2/3] avutil/opt: Add AV_OPT_TYPE_UINT64

Michael Niedermayer michael at niedermayer.cc
Tue Nov 22 13:06:54 EET 2016


On Tue, Nov 22, 2016 at 12:29:02AM +0100, Andreas Cadhalpun wrote:
> On 20.11.2016 21:52, Michael Niedermayer wrote:
> > On Sun, Nov 20, 2016 at 08:55:44PM +0100, Andreas Cadhalpun wrote:
> >> On 20.11.2016 12:57, Michael Niedermayer wrote:
> >>> +        if (intnum == 1 && d == (double)UINT64_MAX) {
> >>> +            *(int64_t *)dst = UINT64_MAX;
> >>
> >> Is there a reason why this uses int64_t, 
> >>
> >>> +        } else if (o->max > INT64_MAX + 1ULL && d > INT64_MAX + 1ULL) {
> >>> +            *(uint64_t *)dst = (llrint(d - (INT64_MAX + 1ULL)) + (INT64_MAX + 1ULL))*intnum;
> >>
> >> but this uint64_t,
> >>
> >>> +        } else {
> >>> +            *(int64_t *)dst = llrint(d) * intnum;
> >>
> >> and this again int64_t?
> > 
> > these are left over from the year old patch this is based on
> > fixed locally
> 
> OK. Now I've another question. Why does the check involve o->max?
> Is the out-of-range check at the beginning of write_number not
> sufficient?

removed, this too came from the old patch

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161122/c56db782/attachment.sig>


More information about the ffmpeg-devel mailing list