[FFmpeg-devel] [FFmpeg-cvslog] disable deprecation warnings in deprecated code
Hendrik Leppkes
h.leppkes at gmail.com
Sun Aug 23 11:05:54 CEST 2015
On Sun, Aug 23, 2015 at 10:51 AM, Andreas Cadhalpun
<andreas.cadhalpun at googlemail.com> wrote:
> On 23.08.2015 05:11, James Almer wrote:
>>> ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sat Aug 8 10:41:33 2015 +0200| [095347ffe4c73143dbeb7b05cde8891fd1289389] | committer: Andreas Cadhalpun
>>>
>>> disable deprecation warnings in deprecated code
>>>
>>> Reviewed-by: wm4 <nfxjfg at googlemail.com>
>>> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>>>
>>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=095347ffe4c73143dbeb7b05cde8891fd1289389
>>> ---
>>>
>>> libavcodec/mpeg12dec.c | 5 ++++-
>>> libavcodec/options_table.h | 3 +++
>>> libavcodec/pthread_frame.c | 9 ++++++++-
>>> libavcodec/resample.c | 2 ++
>>> libavfilter/audio.c | 2 ++
>>> libavfilter/avcodec.c | 2 ++
>>> libavutil/frame.c | 2 ++
>>
>> The changes to libavcodec/options_table.h, which is included by doc/print_options.c, seems to have broken
>> linking doc/print_options.exe (host application) on msvc.
>
> That's caused by some strange hack in libavutil/internal.h:
> #if HAVE_LIBC_MSVCRT
> #include <crtversion.h>
> #if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14
> #pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_strtod")
> #pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_snprintf")
> #endif
>
> So instead of including that, one can copy the definition of the
> FF_{DIS,EN}ABLE_DEPRECATION_WARNINGS macros, see attached patch.
>
> Alternatively one could just revert the changes to libavcodec/options_table.h
> and ignore the warnings in that file.
Copying the macros is unnecessary bloat. Either just enable the
warnings there again, or hack around in print_options.c to make it
avoid the error in other ways.
More information about the ffmpeg-devel
mailing list