put attach files into ffmpeg source dir or tests dir, run tst_gxx.sh

g++ -I.. -I. -D__STDC_CONSTANT_MACROS   -c -o tst_gxx.o tst_gxx.cpp
tst_gxx.cpp: In function 'int main()':
tst_gxx.cpp:5:5: error: taking address of temporary array
make: *** [tst_gxx.o] Error 1

i think we can use a inline function instead of macro

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);

}


2013/1/12 Carl Eugen Hoyos <[email protected]>

> wb <wbsecg1@...> writes:
>
> > g++ 4.7.2 fails to compile av_err2strI use av_err2str
> > in a c++ file, g++ 4.7.2 can not compile it. The error
> > message is "taking address of temporary array".
>
> Please provide a minimal test-case.
>
> Carl Eugen
>
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
>

Attachment: tst_gxx.sh
Description: Bourne shell script

#include <libavutil/avutil.h>

int main()
{
    av_err2str(AVERROR_BUG);
    return 0;
}
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to