Create a writable reference from a given buffer reference, avoiding data copy
if possible.
@param buf buffer reference to make writable. On success, buf is either left
untouched, or it is unreferenced and a new writable AVBufferRef is
written in its place. On failure, buf is left untouched.
@return 0 on success, a negative AVERROR on failure.
Create a writable reference from a given buffer reference, avoiding data copy if possible.
@param buf buffer reference to make writable. On success, buf is either left untouched, or it is unreferenced and a new writable AVBufferRef is written in its place. On failure, buf is left untouched. @return 0 on success, a negative AVERROR on failure.