Fix build with newer FFmpeg.
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index b7ea7de6ca054d1ea171223ddbf81db2e42008b3..bfc84112da9053ab54e48fd6ecee0cce4d550138 100644 (file)
--- a/wscript
+++ b/wscript
@@ -437,6 +437,19 @@ def configure(conf):
                    define_name='DCPOMATIC_HAVE_AVCOMPONENTDESCRIPTOR_DEPTH_MINUS1',
                    mandatory=False)
 
+    # See if we have av_register_all and avfilter_register_all
+    conf.check_cxx(fragment="""
+                            extern "C" {\n
+                            #include <libavformat/avformat.h>\n
+                            #include <libavfilter/avfilter.h>\n
+                            }\n
+                            int main () { av_register_all(); avfilter_register_all(); }\n
+                            """,
+                   msg='Checking for av_register_all and avfilter_register_all',
+                   uselib='AVFORMAT AVFILTER',
+                   define_name='DCPOMATIC_HAVE_AVREGISTER',
+                   mandatory=False)
+
     # Hack: the previous two check_cxx calls end up copying their (necessary) cxxflags
     # to these variables.  We don't want to use these for the actual build, so clean them out.
     conf.env['CXXFLAGS_AVCODEC'] = []