git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bedc99
)
avutil/buffer: Avoid moving the AVBufferRef to a new place in memory in av_buffer_rea...
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 14 Jan 2015 23:42:55 +0000
(
00:42
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 12 Mar 2015 01:15:28 +0000
(
02:15
+0100)
This allows reallocating AVBufferRefs without the need to update
all pointers to it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/buffer.c
patch
|
blob
|
history
diff --git
a/libavutil/buffer.c
b/libavutil/buffer.c
index
ca102fd
..
b31f034
100644
(file)
--- a/
libavutil/buffer.c
+++ b/
libavutil/buffer.c
@@
-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;
}