1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Michael Niedermayer 2015-01-15 00:42:55 +01:00
parent 3bedc99723
commit 35fad1e9c9

View File

@ -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;
}