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>
using std::string;
using std::list;
using boost::shared_ptr;
+using libdcp::Size;
/** Construct a FilterGraph for the settings in a film.
* @param film Film.
* @param decoder Decoder that we are using.
- * @param crop true to apply crop, otherwise false.
* @param s Size of the images to process.
* @param p Pixel format of the images to process.
*/
-FilterGraph::FilterGraph (shared_ptr<Film> film, FFmpegDecoder* decoder, bool crop, Size s, AVPixelFormat p)
+FilterGraph::FilterGraph (shared_ptr<Film> film, FFmpegDecoder* decoder, Size s, AVPixelFormat p)
: _buffer_src_context (0)
, _buffer_sink_context (0)
, _size (s)
filters += ",";
}
- if (crop) {
- filters += crop_string (Position (film->crop().left, film->crop().top), film->cropped_size (decoder->native_size()));
- } else {
- filters += crop_string (Position (0, 0), decoder->native_size());
- }
+ filters += crop_string (Position (film->crop().left, film->crop().top), film->cropped_size (decoder->native_size()));
avfilter_register_all ();