avutil/buffer: Avoid moving the AVBufferRef to a new place in memory in av_buffer_realloc()

This allows reallocating AVBufferRefs without the need to update
all pointers to it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/125/head
Michael Niedermayer 10 years ago
parent 3bedc99723
commit 35fad1e9c9
  1. 3
      libavutil/buffer.c

@ -201,8 +201,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size)
memcpy(new->data, buf->data, FFMIN(size, buf->size));
av_buffer_unref(pbuf);
*pbuf = new;
buffer_replace(pbuf, &new);
return 0;
}

Loading…
Cancel
Save