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:
parent
3bedc99723
commit
35fad1e9c9
@ -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…
Reference in New Issue
Block a user