Use more local methods rather than calling out to Film in the Decoder.
[dcpomatic.git] / src / lib / ffmpeg_compatibility.cc
index bdaf735a21f698eb33732a213f0423c735768d0b..c47cdf5ce71f03c4ee4edfc31b85e013af1085c4 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
 }
 #include "exceptions.h"
 
-#ifdef DVDOMATIC_FFMPEG_0_8_3  
+#if LIBAVFILTER_VERSION_MAJOR == 2 && LIBAVFILTER_VERSION_MINOR == 15
 
 typedef struct {
        enum PixelFormat pix_fmt;
@@ -64,7 +64,7 @@ avsink_query_formats (AVFilterContext* ctx)
 AVFilter*
 get_sink ()
 {
-#ifdef DVDOMATIC_FFMPEG_0_8_3  
+#if LIBAVFILTER_VERSION_MAJOR == 2 && LIBAVFILTER_VERSION_MINOR == 15
        /* XXX does this leak stuff? */
        AVFilter* buffer_sink = new AVFilter;
        buffer_sink->name = av_strdup ("avsink");
@@ -100,7 +100,7 @@ get_sink ()
 #endif
 }
 
-#ifdef DVDOMATIC_FFMPEG_0_8_3
+#if LIBAVFILTER_VERSION_MAJOR == 2 && LIBAVFILTER_VERSION_MINOR == 15
 AVFilterInOut *
 avfilter_inout_alloc ()
 {