diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-22 21:14:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-22 21:14:57 +0100 |
commit | 9ba11902979651fecbd541b855653b620816dde6 (patch) | |
tree | 5c90d05d9dfa570c86e4be371470d1bb25b9d7d3 /libavutil/mem.c | |
parent | b0dcf7653064186ce738edb7467157a653157890 (diff) | |
download | ffmpeg-9ba11902979651fecbd541b855653b620816dde6.tar.gz |
avutil/mem: avoid using intptr_t to access void* in av_dynarray_add()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/mem.c')
-rw-r--r-- | libavutil/mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c index 7206ddcea4..e0d0d9040b 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -280,11 +280,11 @@ void *av_memdup(const void *p, size_t size) void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem) { - intptr_t *tab = *(intptr_t**)tab_ptr; + void **tab = *(void ***)tab_ptr; AV_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, { - tab[*nb_ptr] = (intptr_t)elem; - *(intptr_t **)tab_ptr = tab; + tab[*nb_ptr] = elem; + *(void ***)tab_ptr = tab; }, { *nb_ptr = 0; av_freep(tab_ptr); |