[FFmpeg-devel] [FFmpeg-cvslog] disable deprecation warnings in deprecated code

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sun Aug 23 10:51:33 CEST 2015


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.

Best regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-options_table-fix-compatibility-with-MSVC.patch
Type: text/x-diff
Size: 1995 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150823/325a4ccb/attachment.patch>


More information about the ffmpeg-devel mailing list