History

avutil/buffer: constify some function parameters

James Almer committed 5 years ago

Commit ccfdef71 parent f58abfb4 files · +11 −7Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavutil/buffer.c +3 −3
  3. libavutil/buffer.h +3 −3
  4. libavutil/version.h +1 −1
doc/APIchanges+4−0
@@ -14,6 +14,10 @@ libavutil: 2021-04-27 · 13 unmodified lines
14 14
15API changes, most recent first:15API changes, most recent first:
16 16
172021-09-17 - xxxxxxxxxx - lavu 57.5.101 - buffer.h
18 Constified the input parameters in av_buffer_replace(), av_buffer_ref(),
19 and av_buffer_pool_buffer_get_opaque().
20
172021-09-08 - xxxxxxxxxx - lavu 57.5.100 - hwcontext_d3d11va.h212021-09-08 - xxxxxxxxxx - lavu 57.5.100 - hwcontext_d3d11va.h
18 Add AVD3D11VAFramesContext.texture_infos22 Add AVD3D11VAFramesContext.texture_infos
19 23
libavutil/buffer.c+3−3
@@ -90,7 +90,7 @@ AVBufferRef *av_buffer_allocz(size_t size) · 89 unmodified lines
90 return ret;90 return ret;
91}91}
92 92
93AVBufferRef *av_buffer_ref(AVBufferRef *buf)93AVBufferRef *av_buffer_ref(const AVBufferRef *buf)
94{94{
95 AVBufferRef *ret = av_mallocz(sizeof(*ret));95 AVBufferRef *ret = av_mallocz(sizeof(*ret));
96 96
@@ -216,7 +216,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, size_t size) · 119 unmodified lines
216 return 0;216 return 0;
217}217}
218 218
219int av_buffer_replace(AVBufferRef **pdst, AVBufferRef *src)219int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
220{220{
221 AVBufferRef *dst = *pdst;221 AVBufferRef *dst = *pdst;
222 AVBufferRef *tmp;222 AVBufferRef *tmp;
@@ -395,7 +395,7 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool) · 172 unmodified lines
395 return ret;395 return ret;
396}396}
397 397
398void *av_buffer_pool_buffer_get_opaque(AVBufferRef *ref)398void *av_buffer_pool_buffer_get_opaque(const AVBufferRef *ref)
399{399{
400 BufferPoolEntry *buf = ref->buffer->opaque;400 BufferPoolEntry *buf = ref->buffer->opaque;
401 av_assert0(buf);401 av_assert0(buf);
libavutil/buffer.h+3−3
@@ -145,7 +145,7 @@ void av_buffer_default_free(void *opaque, uint8_t *data); · 144 unmodified lines
145 * @return a new AVBufferRef referring to the same AVBuffer as buf or NULL on145 * @return a new AVBufferRef referring to the same AVBuffer as buf or NULL on
146 * failure.146 * failure.
147 */147 */
148AVBufferRef *av_buffer_ref(AVBufferRef *buf);148AVBufferRef *av_buffer_ref(const AVBufferRef *buf);
149 149
150/**150/**
151 * Free a given reference and automatically free the buffer if there are no more151 * 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); · 60 unmodified lines
212 * @return 0 on success212 * @return 0 on success
213 * AVERROR(ENOMEM) on memory allocation failure.213 * AVERROR(ENOMEM) on memory allocation failure.
214 */214 */
215int av_buffer_replace(AVBufferRef **dst, AVBufferRef *src);215int av_buffer_replace(AVBufferRef **dst, const AVBufferRef *src);
216 216
217/**217/**
218 * @}218 * @}
@@ -313,7 +313,7 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool); · 94 unmodified lines
313 * therefore you have to use this function to access the original opaque313 * therefore you have to use this function to access the original opaque
314 * parameter of an allocated buffer.314 * parameter of an allocated buffer.
315 */315 */
316void *av_buffer_pool_buffer_get_opaque(AVBufferRef *ref);316void *av_buffer_pool_buffer_get_opaque(const AVBufferRef *ref);
317 317
318/**318/**
319 * @}319 * @}
libavutil/version.h+1−1
@@ -80,7 +80,7 @@ · 79 unmodified lines
80 80
81#define LIBAVUTIL_VERSION_MAJOR 5781#define LIBAVUTIL_VERSION_MAJOR 57
82#define LIBAVUTIL_VERSION_MINOR 582#define LIBAVUTIL_VERSION_MINOR 5
83#define LIBAVUTIL_VERSION_MICRO 10083#define LIBAVUTIL_VERSION_MICRO 101
84 84
85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
86 LIBAVUTIL_VERSION_MINOR, \86 LIBAVUTIL_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t