X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_filter_graph.cc;h=6075500e9d9148f5af103e9f56f6034dbdc3ab58;hb=697d21c3f9bc6243151372f988936662b9993510;hp=534dd6142fce4e9765245f6b25df273e68e427fe;hpb=b1dc9c3a2f7e55c9afc5bf2d5b465371b048e14f;p=dcpomatic.git diff --git a/src/lib/video_filter_graph.cc b/src/lib/video_filter_graph.cc index 534dd6142..6075500e9 100644 --- a/src/lib/video_filter_graph.cc +++ b/src/lib/video_filter_graph.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -35,9 +35,10 @@ using std::string; using std::make_pair; using boost::shared_ptr; -VideoFilterGraph::VideoFilterGraph (dcp::Size s, AVPixelFormat p) +VideoFilterGraph::VideoFilterGraph (dcp::Size s, AVPixelFormat p, dcp::Fraction r) : _size (s) , _pixel_format (p) + , _frame_rate (r) { } @@ -85,7 +86,13 @@ string VideoFilterGraph::src_parameters () const { char buffer[256]; - snprintf (buffer, sizeof(buffer), "video_size=%dx%d:pix_fmt=%d:time_base=1/1:pixel_aspect=1/1", _size.width, _size.height, _pixel_format); + snprintf ( + buffer, sizeof(buffer), + "video_size=%dx%d:pix_fmt=%d:frame_rate=%d/%d:time_base=1/1:pixel_aspect=1/1", + _size.width, _size.height, + _pixel_format, + _frame_rate.numerator, _frame_rate.denominator + ); return buffer; }