[FFmpeg-devel] [PATCH 1/4] lavu: add simple array implementation

Lukasz Marek lukasz.m.luki2 at gmail.com
Sun Mar 23 15:32:41 CET 2014


On 22.03.2014 21:13, Michael Niedermayer wrote:
> On Sat, Mar 22, 2014 at 06:00:28PM +0100, Lukasz Marek wrote:
>> On 21.03.2014 15:49, Nicolas George wrote:
>>> Le primidi 1er germinal, an CCXXII, Lukasz Marek a écrit :
>>>> intptr_t *tab = *(void**)tab_ptr;
>>>>
>>>> This line is copied from Nicolas implementation/original implementation.
>>>
>>> Yes, this line is currently present in the code. There is nothing that
>>> prevents to fix it, I suppose just changing to "void *tab" would work, but
>>> that seems orthogonal to the patches at hand.
>>>
>>> Regards,
>>>
>>
>> Patch attached. I hope I did it in correct way.
>
> use of intptr_t is certainly not correct
> void* and intptr_t might for example have different endianness or
> size. intptr_t just has to be able to store a pointer,
> a architecture with segment:offset pointers might have
> 48bit pointers but a 64bit intptr_t.
> Above is of course hypothetical, and based on my understanding of
> ISO C, i dont know if these occur on any relevant platforms and of
> course i might be misinterpreting the spec

You are right, just wanted to make it the same way as original function.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavu-mem-add-av_dynarray_add_nofree-function.patch
Type: text/x-patch
Size: 2899 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140323/4885b51a/attachment.bin>


More information about the ffmpeg-devel mailing list