summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-09-17 00:06:45 -0300
committerJames Almer <jamrial@gmail.com>2021-09-17 13:28:09 -0300
commitccfdef79b132bef49f4654266d5d3da8d1deb305 (patch)
treeeaba4efc2744aa3020c2b19054789e4e7d2e864c /libavutil
parentf58abfbedc35737ca5a732acbb0448e771a236f8 (diff)
avutil/buffer: constify some function parameters
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/buffer.c6
-rw-r--r--libavutil/buffer.h6
-rw-r--r--libavutil/version.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index b13eeadffb..a32b7deb89 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -90,7 +90,7 @@ AVBufferRef *av_buffer_allocz(size_t size)
return ret;
}
-AVBufferRef *av_buffer_ref(AVBufferRef *buf)
+AVBufferRef *av_buffer_ref(const AVBufferRef *buf)
{
AVBufferRef *ret = av_mallocz(sizeof(*ret));
@@ -216,7 +216,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, size_t size)
return 0;
}
-int av_buffer_replace(AVBufferRef **pdst, AVBufferRef *src)
+int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
{
AVBufferRef *dst = *pdst;
AVBufferRef *tmp;
@@ -395,7 +395,7 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool)
return ret;
}
-void *av_buffer_pool_buffer_get_opaque(AVBufferRef *ref)
+void *av_buffer_pool_buffer_get_opaque(const AVBufferRef *ref)
{
BufferPoolEntry *buf = ref->buffer->opaque;
av_assert0(buf);
diff --git a/libavutil/buffer.h b/libavutil/buffer.h
index 2c0ce1a108..e1ef5b7f07 100644
--- a/libavutil/buffer.h
+++ b/libavutil/buffer.h
@@ -145,7 +145,7 @@ void av_buffer_default_free(void *opaque, uint8_t *data);
* @return a new AVBufferRef referring to the same AVBuffer as buf or NULL on
* failure.
*/
-AVBufferRef *av_buffer_ref(AVBufferRef *buf);
+AVBufferRef *av_buffer_ref(const AVBufferRef *buf);
/**
* Free a given reference and automatically free the buffer if there are no more
@@ -212,7 +212,7 @@ int av_buffer_realloc(AVBufferRef **buf, size_t size);
* @return 0 on success
* AVERROR(ENOMEM) on memory allocation failure.
*/
-int av_buffer_replace(AVBufferRef **dst, AVBufferRef *src);
+int av_buffer_replace(AVBufferRef **dst, const AVBufferRef *src);
/**
* @}
@@ -313,7 +313,7 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool);
* therefore you have to use this function to access the original opaque
* parameter of an allocated buffer.
*/
-void *av_buffer_pool_buffer_get_opaque(AVBufferRef *ref);
+void *av_buffer_pool_buffer_get_opaque(const AVBufferRef *ref);
/**
* @}
diff --git a/libavutil/version.h b/libavutil/version.h
index f220e192c8..1e6a80f86e 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 57
#define LIBAVUTIL_VERSION_MINOR 5
-#define LIBAVUTIL_VERSION_MICRO 100
+#define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \