[FFmpeg-user] help: I use av_err2str function in c++, it occurs " error: taking address of temporary array" when build.

Diederick C. Niehorster dcnieho at gmail.com
Thu Jun 10 13:55:08 EEST 2021


That macro doesn't work in C++. use:

char a[AV_ERROR_MAX_STRING_SIZE] = { 0 };
av_make_error_string(a, AV_ERROR_MAX_STRING_SIZE, errCode_);

On Thu, Jun 10, 2021 at 12:40 PM 沈海煌 <chain78 at 163.com> wrote:
>
> I use av_err2str function in c++, it occurs  " error: taking address of temporary array" when build.
>
>
> I use extern "C" but it doesn't work.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list