[vlc-devel] [PATCH] es_out: merge es->i_id with es->fmt.i_id
Rémi Denis-Courmont
remi at remlab.net
Sun Aug 19 17:24:10 CEST 2018
I don't recall suggesting "void" pointers. I suggested reference-counted (and thus, typed) pointers.
Le 19 août 2018 11:16:19 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>I agree about keeping fmt.id for TS ES and using an unique ID for
>libvlc
>or the new input manager.
>Using a void* can be racy when deleting and creating an ES (the es can
>use the same pointer).
>An integer overflow is very unlikely to happen when creating an ES (and
>we can still check the overflw and fail if it happens).
>Do you still prefer using void* ?
>
>On Fri, Aug 17, 2018, at 19:03, Rémi Denis-Courmont wrote:
>> You cannot have more than uintptr_t references on an object in memory
>> (or even all objects).>
>> But as François pointed out, no matter how large the integer, you
>can
>> always overflow after long enough.>
>> I just don't see the point in using handles or IDs when you can use
>> pointers. Pointers are generally the easiest identifier in C.>
>> Le 17 août 2018 17:59:44 GMT+03:00, Thomas Guillem <thomas at gllm.fr>
>> a écrit :>> So, I plan to use a uintptr_t (on the allocated es) as a
>unique es
>>> identifier.
>>>>>
>>>
>>> On Fri, Aug 17, 2018, at 15:27, Francois Cartegnie wrote:
>>>
>>>> Le 17/08/2018 à 15:21, Francois Cartegnie a écrit :
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> You can't track usable ids unless you allocate UINTxx_MAX bits to
>>>>>>>>> reference id usage, and add a worth case time of that number
>of
>>>>> bytes - 1.
>>>>>>>>
>>>>
>>>> worsT case time
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hell.....
>>>>
>>>>
>>>>
>>>> vlc-devel mailing list
>>>>
>>>> To unsubscribe or modify your subscription options:
>>>>
>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>
>>>
>>>
>>> vlc-devel mailing list
>>>
>>> To unsubscribe or modify your subscription options:
>>>
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>
>>
>> --
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>> excuser ma brièveté.>
>_________________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180819/3aed3af2/attachment.html>
More information about the vlc-devel
mailing list