Build fixes for Boost >= 1.73
[dcpomatic.git] / src / lib / ffmpeg_file_encoder.cc
index abde0c153f433a754fc77c2ac253cfe2bdac67af..2c5faa461e75b5120ca390e81cf25e3c4ccacdb8 100644 (file)
@@ -38,6 +38,9 @@ using std::pair;
 using boost::shared_ptr;
 using boost::bind;
 using boost::weak_ptr;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
 
 int FFmpegFileEncoder::_video_stream_index = 0;
 int FFmpegFileEncoder::_audio_stream_index = 1;
@@ -260,7 +263,8 @@ FFmpegFileEncoder::video (shared_ptr<PlayerVideo> video, DCPTime time)
        frame->width = image->size().width;
        frame->height = image->size().height;
        frame->format = _pixel_format;
-       frame->pts = time.seconds() / av_q2d (_video_stream->time_base);
+       DCPOMATIC_ASSERT (_video_stream->time_base.num == 1);
+       frame->pts = time.get() * _video_stream->time_base.den / DCPTime::HZ;
 
        AVPacket packet;
        av_init_packet (&packet);