summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 6681002345..49a1f2d395 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -170,7 +170,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size)
return 0;
if (!(buf->buffer->flags & BUFFER_FLAG_REALLOCATABLE) ||
- !av_buffer_is_writable(buf)) {
+ !av_buffer_is_writable(buf) || buf->data != buf->buffer->data) {
/* cannot realloc, allocate a new reallocable buffer and copy data */
AVBufferRef *new = NULL;