summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-16 21:42:45 +0100
committerClément Bœsch <u@pkh.me>2017-03-16 21:42:45 +0100
commit5e4a5726995ccf9f8a934c550bceec31cc1857c1 (patch)
treee28b0844650602b3fcd2dce06359181c0ce165c8 /libavutil
parent5dd7ea9f569b92c1e3de10eff46b80f3dfa63a1d (diff)
parent24a362569bff1d4161742fffaca80a4a4428be8a (diff)
Merge commit '24a362569bff1d4161742fffaca80a4a4428be8a'
* commit '24a362569bff1d4161742fffaca80a4a4428be8a': buffer: fix av_buffer_realloc() when the data is offset wrt buffer start Merged-by: Clément Bœsch <u@pkh.me>
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 694e116a3c..478e4880e5 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -191,7 +191,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;