On Fri, 2 Aug 2013, Diego Biurrun  wrote:

Module: libav
Branch: master
Commit: 7950e519bb094897f957b9a9531cc60ba46cbc91

Author:    Diego Biurrun <[email protected]>
Committer: Diego Biurrun <[email protected]>
Date:      Wed Mar 27 18:36:51 2013 +0100

Disable deprecation warnings for cases where a replacement is available

---

libavcodec/avpacket.c       |   15 +++++++++++++++
libavcodec/mlp_parser.c     |    5 +++++
libavcodec/mlpdec.c         |    3 +++
libavcodec/options_table.h  |    3 +++
libavcodec/pthread.c        |    9 +++++++++
libavcodec/utils.c          |   13 +++++++++++++
libavdevice/v4l2.c          |    3 +++
libavfilter/avfilter.c      |    3 +++
libavfilter/avfiltergraph.c |    5 +++++
libavfilter/buffersink.c    |    3 +++
libavfilter/buffersrc.c     |    3 +++
libavfilter/internal.h      |    5 +++++
libavformat/asfdec.c        |    3 +++
libavformat/avidec.c        |    5 +++++
libavformat/mux.c           |    3 +++
libavformat/mxg.c           |    5 +++++
libavformat/psxstr.c        |    3 +++
libavformat/rmdec.c         |    3 +++
libavformat/utils.c         |    3 +++
libavutil/pixdesc.c         |    4 +++-
20 files changed, 98 insertions(+), 1 deletions(-)

diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 5e9d484..8515603 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -23,6 +23,7 @@
#include <float.h>
#include <limits.h>

+#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "version.h"
@@ -39,6 +40,7 @@

#define AV_CODEC_DEFAULT_BITRATE 200*1000

+FF_DISABLE_DEPRECATION_WARNINGS
static const AVOption avcodec_options[] = {
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 
AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E},
{"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance 
specifies how far "
@@ -373,6 +375,7 @@ static const AVOption avcodec_options[] = {
{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 
0}, 0, 1, A|V|D },
{NULL},
};
+FF_ENABLE_DEPRECATION_WARNINGS

#undef A
#undef V

Sorry for not catching this earlier, but this is not good.

This header is included in host compilation when building doc/print_options, and the fact that the target compiler supports deprecation pragmas doesn't imply that the host compiler supports it.

This also causes problems even if the deprecation pragmas are disabled, when the host and target compiler features differ. This includes libavutil/internal.h which is not ok in host compilation, since it includes config.h and a whole lot of other things. When cross-compiling with MSVC from linux, this breaks the build, since internal.h includes libm.h. If the target doesn't have functions like cbrtf but the host does, you will end up with errors like this:

HOSTCC  doc/print_options.o
In file included from libavutil/internal.h:120:0,
                 from libavcodec/options_table.h:26,
                 from doc/print_options.c:32:
libavutil/libm.h:48:31: error: static declaration of ‘cbrtf’ follows non-static declaration

Unfortunately this wasn't caught by the msvc/wine setup on fate since that machine lacks texi2html.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to