On Jan 14, 2013, at 13:48, Alex Cohn wrote:

> ... but I believe that the solution is simple: this macro should not
> be used in C++, that's it! Whoever needs similar functionality in g++,
> may use
> 
>    #undef av_err2str
>    #define av_err2str(errnum) \
>    av_make_error_string((char*)__builtin_alloca(AV_ERROR_MAX_STRING_SIZE),
> AV_ERROR_MAX_STRING_SIZE, errnum)


Indeed - though I'd advise to use alloca() for more portability and there's no 
reason to avoid it in C either. Of course there could be a specific C++ version 
using std::string, I presume, but why bother?

R.

_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to