buffer: fix av_buffer_realloc() when the data is offset wrt buffer start
authorAnton Khirnov <anton@khirnov.net>
Tue, 2 Aug 2016 19:16:44 +0000 (21:16 +0200)
committerAnton Khirnov <anton@khirnov.net>
Wed, 3 Aug 2016 09:07:15 +0000 (11:07 +0200)
commit24a362569bff1d4161742fffaca80a4a4428be8a
treece3f110ae279017c59e48cb21eb1c3ef85ed44f3
parente99ecda55082cb9dde8fd349361e169dc383943a
buffer: fix av_buffer_realloc() when the data is offset wrt buffer start

In such a case behave as if the buffer was not reallocatable -- allocate a
new one and copy the data (preserving just the part described by the
reference passed to av_buffer_realloc).

CC: libav-stable@libav.org
Reported-By: wm4 <nfxjfg@googlemail.com>
libavutil/buffer.c