Browse Source

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>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
26d81b5703
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavutil/buffer.c

+ 2
- 2
libavutil/buffer.c View File

@@ -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…
Cancel
Save