New submission from jkolb <[EMAIL PROTECTED]>: I get crashes in avcodec_open with an mjpeg codec in av_log2. This is because av_log2 is defined in libavcodec but it uses the const uint8_t ff_log2_tab defined in libavutil.
The LD supplied with gcc 4.4 on mingw warns against auto-importing const data, the code generation is bogus. If I add __declspec(dllimport) const uint8_t ff_log2_tab[256] to a .c file in libavcodec the crash goes away (explicit import). Data should not be exported from dlls, and should be wrapped in functions. I believe the msdn docs mention this somewhere. Note that this does work on gcc 4.3 (at least on 32 bit). There is no gcc 4.4 available for 32 bit mingw. ---------- messages: 3250 nosy: jkolb priority: normal status: new substatus: new title: auto-import of const data fails with gcc 4.4 on mingw type: bug ______________________________________________________ FFmpeg issue tracker <[EMAIL PROTECTED]> <https://roundup.mplayerhq.hu/roundup/ffmpeg/issue647> ______________________________________________________
