[FFmpeg-cvslog] Merge commit '24a362569bff1d4161742fffaca80a4a4428be8a'

Clément Bœsch git at videolan.org
Thu Mar 16 22:47:29 EET 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Thu Mar 16 21:42:45 2017 +0100| [5e4a5726995ccf9f8a934c550bceec31cc1857c1] | committer: Clément Bœsch

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 at pkh.me>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e4a5726995ccf9f8a934c550bceec31cc1857c1
---

 libavutil/buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 694e116..478e488 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;
 


======================================================================




More information about the ffmpeg-cvslog mailing list