"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavutil/buffer.c" between
libav-11.7.tar.gz and libav-11.8.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

buffer.c  (libav-11.7):buffer.c  (libav-11.8)
skipping to change at line 173 skipping to change at line 173
} }
buf->buffer->flags |= BUFFER_FLAG_REALLOCATABLE; buf->buffer->flags |= BUFFER_FLAG_REALLOCATABLE;
*pbuf = buf; *pbuf = buf;
return 0; return 0;
} else if (buf->size == size) } else if (buf->size == size)
return 0; return 0;
if (!(buf->buffer->flags & BUFFER_FLAG_REALLOCATABLE) || 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 */ /* cannot realloc, allocate a new reallocable buffer and copy data */
AVBufferRef *new = NULL; AVBufferRef *new = NULL;
av_buffer_realloc(&new, size); av_buffer_realloc(&new, size);
if (!new) if (!new)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
memcpy(new->data, buf->data, FFMIN(size, buf->size)); memcpy(new->data, buf->data, FFMIN(size, buf->size));
av_buffer_unref(pbuf); av_buffer_unref(pbuf);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS