From 94b48aad7958be46e8294ed736baa53c86ce6b26 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 9 Jan 2013 09:49:24 +0000 Subject: Try to allow builds with 0.10.4-era ffmpeg. --- src/lib/ffmpeg_compatibility.cc | 8 ++++++++ src/lib/ffmpeg_compatibility.h | 7 +++++++ src/lib/filter_graph.h | 1 + src/lib/image.h | 1 + src/lib/matcher.h | 1 + 5 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/lib/ffmpeg_compatibility.cc b/src/lib/ffmpeg_compatibility.cc index c47cdf5ce..09f9276ac 100644 --- a/src/lib/ffmpeg_compatibility.cc +++ b/src/lib/ffmpeg_compatibility.cc @@ -107,3 +107,11 @@ avfilter_inout_alloc () return (AVFilterInOut *) av_malloc (sizeof (AVFilterInOut)); } #endif + +#ifndef HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP +int64_t av_frame_get_best_effort_timestamp (AVFrame const * f) +{ + return f->best_effort_timestamp; +} + +#endif diff --git a/src/lib/ffmpeg_compatibility.h b/src/lib/ffmpeg_compatibility.h index 80cc79ffb..772d22c33 100644 --- a/src/lib/ffmpeg_compatibility.h +++ b/src/lib/ffmpeg_compatibility.h @@ -22,3 +22,10 @@ struct AVFilterInOut; extern AVFilter* get_sink (); extern AVFilterInOut* avfilter_inout_alloc (); +#ifndef HAVE_AV_PIXEL_FORMAT +#define AVPixelFormat PixelFormat +#endif + +#ifndef HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP +extern int64_t av_frame_get_best_effort_timestamp (AVFrame const *); +#endif diff --git a/src/lib/filter_graph.h b/src/lib/filter_graph.h index a4b9ef75f..9e6ac6252 100644 --- a/src/lib/filter_graph.h +++ b/src/lib/filter_graph.h @@ -25,6 +25,7 @@ #define DVDOMATIC_FILTER_GRAPH_H #include "util.h" +#include "ffmpeg_compatibility.h" class Image; class VideoFilter; diff --git a/src/lib/image.h b/src/lib/image.h index 95e0de9dc..e19c6f54b 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -32,6 +32,7 @@ extern "C" { #include } #include "util.h" +#include "ffmpeg_compatibility.h" class Scaler; class RGBFrameImage; diff --git a/src/lib/matcher.h b/src/lib/matcher.h index 9bd30fe62..b94c28446 100644 --- a/src/lib/matcher.h +++ b/src/lib/matcher.h @@ -19,6 +19,7 @@ #include #include "processor.h" +#include "ffmpeg_compatibility.h" class Matcher : public AudioVideoProcessor { -- cgit v1.2.3