MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_buffer_make_writable

Function av_buffer_make_writable

libavutil/buffer.c:165–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165int av_buffer_make_writable(AVBufferRef **pbuf)
166{
167 AVBufferRef *newbuf, *buf = *pbuf;
168
169 if (av_buffer_is_writable(buf))
170 return 0;
171
172 newbuf = av_buffer_alloc(buf->size);
173 if (!newbuf)
174 return AVERROR(ENOMEM);
175
176 memcpy(newbuf->data, buf->data, buf->size);
177
178 buffer_replace(pbuf, &newbuf);
179
180 return 0;
181}
182
183int av_buffer_realloc(AVBufferRef **pbuf, size_t size)
184{

Callers 2

side_data_stereo3d_mergeFunction · 0.85
raw_decodeFunction · 0.85

Calls 3

av_buffer_is_writableFunction · 0.85
av_buffer_allocFunction · 0.85
buffer_replaceFunction · 0.85

Tested by

no test coverage detected