Commit 35fad1e9 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3bedc997
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment