ffmpeg 0.10.4 seems not to need a buffersrc.h include.
authorCarl Hetherington <cth@carlh.net>
Wed, 9 Jan 2013 23:59:20 +0000 (23:59 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 Jan 2013 23:59:20 +0000 (23:59 +0000)
src/lib/filter_graph.cc
wscript

index 17107a05bd4a0246a3cc521c19a6edd1a9ae658d..376ab404fad8e23e42944c9504bb9fbbc5df5615 100644 (file)
@@ -23,7 +23,9 @@
 
 extern "C" {
 #include <libavfilter/avfiltergraph.h>
+#ifdef HAVE_BUFFERSRC_H        
 #include <libavfilter/buffersrc.h>
+#endif 
 #if (LIBAVFILTER_VERSION_MAJOR == 2 && LIBAVFILTER_VERSION_MINOR >= 53 && LIBAVFILTER_VERSION_MINOR <= 77) || LIBAVFILTER_VERSION_MAJOR == 3
 #include <libavfilter/avcodec.h>
 #include <libavfilter/buffersink.h>
diff --git a/wscript b/wscript
index bc272b5d70dc65d8f873a4f3cea159f5fea50101..657ddc1fafbe8025b9735f45eae07e8edfbb49e7 100644 (file)
--- a/wscript
+++ b/wscript
@@ -171,6 +171,16 @@ def configure(conf):
                              define_name = 'HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP',
                              mandatory = False)
 
+    conf.check_cc(fragment = """
+                             extern "C" {
+                               #include <libavfilter/buffersrc.h>
+                             }
+                             int main() { } 
+                             """, msg = 'Checking for buffersrc.h',
+                             uselib = 'AVCODEC',
+                             define_name = 'HAVE_BUFFERSRC_H',
+                             mandatory = False)
+
     conf.recurse('src')
     conf.recurse('test')