Put av_register_all() in the right place.
authorCarl Hetherington <cth@carlh.net>
Wed, 10 May 2017 12:53:28 +0000 (13:53 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 10 May 2017 12:53:28 +0000 (13:53 +0100)
src/lib/ffmpeg.cc
src/lib/util.cc

index ce87cc14f2d7801f2974202008012f624b09d1ae..2038d6a8590f2e6df8a2d9c7301ac92251be05c4 100644 (file)
@@ -110,8 +110,6 @@ FFmpeg::ffmpeg_log_callback (void* ptr, int level, const char* fmt, va_list vl)
 void
 FFmpeg::setup_general ()
 {
-       av_register_all ();
-
        /* This might not work too well in some cases of multiple FFmpeg decoders,
           but it's probably good enough.
        */
index b1dfeab558421d3406d5535ad3022e2d63409687..0ce538cdff2429fbd4f571a57e14e292faddef8e 100644 (file)
@@ -44,6 +44,7 @@
 #include <dcp/subtitle_asset.h>
 extern "C" {
 #include <libavfilter/avfilter.h>
+#include <libavformat/avformat.h>
 #include <libavcodec/avcodec.h>
 }
 #include <curl/curl.h>
@@ -323,6 +324,7 @@ dcpomatic_setup ()
        SetUnhandledExceptionFilter(exception_handler);
 #endif
 
+       av_register_all ();
        avfilter_register_all ();
 
 #ifdef DCPOMATIC_OSX