On Mon, Jan 14, 2013 at 2:59 PM, "René J.V. Bertin" <[email protected]> wrote: > 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.
Yes, alloca() should be OK. Now that I think about it, that's right: it is compatible with C, too. But Microsoft compiler only recognizes _alloca(). BR, Alex Cohn _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
