Commit dc92464a authored by Michael Niedermayer's avatar Michael Niedermayer

avutil: add av_buffer_get_ref_count()

This function is quite usefull for debuging
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 74601659
......@@ -130,6 +130,11 @@ void *av_buffer_get_opaque(const AVBufferRef *buf)
return buf->buffer->opaque;
}
int av_buffer_get_ref_count(const AVBufferRef *buf)
{
return buf->buffer->refcount;
}
int av_buffer_make_writable(AVBufferRef **pbuf)
{
AVBufferRef *newbuf, *buf = *pbuf;
......
......@@ -167,6 +167,8 @@ int av_buffer_is_writable(const AVBufferRef *buf);
*/
void *av_buffer_get_opaque(const AVBufferRef *buf);
int av_buffer_get_ref_count(const AVBufferRef *buf);
/**
* Create a writable reference from a given buffer reference, avoiding data copy
* if possible.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment