[FFmpeg-devel] [PATCH 4/4] Include headers for optional libraries only when enabled.

Diego 'Flameeyes' Pettenò flameeyes
Thu Oct 2 18:55:19 CEST 2008


Include the headers for libavfilter, libswscale and libpostproc when
they are enabled (and thus linked in).

Without this change, Sun Studio will fail to link FFmpeg since two
inline functions defined in avfilter.h will have undefined references
to non-inline libavfilter functions.
---

 cmdutils.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 8a01a0a..7037f7a 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -26,10 +26,16 @@
 
 #include "config.h"
 #include "libavformat/avformat.h"
+#if ENABLE_AVFILTER
 #include "libavfilter/avfilter.h"
+#endif
 #include "libavdevice/avdevice.h"
+#if ENABLE_SWSCALE
 #include "libswscale/swscale.h"
+#endif
+#if ENABLE_POSTPROC
 #include "libpostproc/postprocess.h"
+#endif
 #include "libavutil/avstring.h"
 #include "libavcodec/opt.h"
 #include "cmdutils.h"





More information about the ffmpeg-devel mailing list