mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
avutil/buffer: Avoid moving the AVBufferRef to a new place in memory in av_buffer_make_writable()
This allows making a AVBufferRef writable without the need to update all pointers to it Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
35fad1e9c9
commit
26d81b5703
@ -159,8 +159,8 @@ int av_buffer_make_writable(AVBufferRef **pbuf)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
memcpy(newbuf->data, buf->data, buf->size);
|
||||
av_buffer_unref(pbuf);
|
||||
*pbuf = newbuf;
|
||||
|
||||
buffer_replace(pbuf, &newbuf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user