其他分享
首页 > 其他分享> > libavutil/error.h:132:58: error: taking address of temporary array av_make_error_string..

libavutil/error.h:132:58: error: taking address of temporary array av_make_error_string..

作者:互联网

libavutil/error.h:132改成如下


/**
 * Convenience macro, the return value should be used only directly in
 * function arguments but never stand-alone.
 */
//#define av_err2str(errnum) \
 //   av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)


av_always_inline char* av_err2str(int errnum)
{
    static char str[AV_ERROR_MAX_STRING_SIZE];
    memset(str, 0, sizeof(str));
    return av_make_error_string(str, AV_ERROR_MAX_STRING_SIZE, errnum);
}

标签:libavutil,error,temporary,STRING,MAX,AV,errnum,av
来源: https://blog.csdn.net/cindywry/article/details/112062646