Commit 26d81b57 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 35fad1e9
......@@ -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;
}
......
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