forked from FFmpeg/FFmpeg
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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue