This allows reallocating AVBufferRefs without the need to update all pointers to it
Signed-off-by: Michael Niedermayer <michae...@gmx.at> --- libavutil/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index ca102fd..b31f034 100644 --- 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; } -- 1.7.9.5 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel