X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg.cc;h=85c65763f146e12ac31f1b18dea24b1ceac8c74c;hb=a5d004b0773f633401528392fc28e66d70e13ac8;hp=0802fa159822f43f7895e2a03bc40b3afe6b06e5;hpb=2da4caba7871455c097c0ed940dd6f2332dbda5d;p=dcpomatic.git diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 0802fa159..85c65763f 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -27,7 +27,6 @@ #include "dcpomatic_log.h" #include "ffmpeg_subtitle_stream.h" #include "ffmpeg_audio_stream.h" -#include "decrypted_ecinema_kdm.h" #include "digester.h" #include "compose.hpp" #include "config.h" @@ -38,7 +37,6 @@ extern "C" { #include } #include -#include #include #include "i18n.h" @@ -47,14 +45,14 @@ using std::string; using std::cout; using std::cerr; using std::vector; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using dcp::raw_convert; using namespace dcpomatic; boost::mutex FFmpeg::_mutex; -FFmpeg::FFmpeg (boost::shared_ptr c) +FFmpeg::FFmpeg (std::shared_ptr c) : _ffmpeg_content (c) , _avio_buffer (0) , _avio_buffer_size (4096) @@ -128,13 +126,6 @@ FFmpeg::setup_general () _format_context->pb = _avio_context; AVDictionary* options = 0; -#ifdef DCPOMATIC_VARIANT_SWAROOP - if (_ffmpeg_content->kdm()) { - DecryptedECinemaKDM kdm (_ffmpeg_content->kdm().get(), Config::instance()->decryption_chain()->key().get()); - av_dict_set (&options, "decryption_key", kdm.key().hex().c_str(), 0); - } -#endif - int e = avformat_open_input (&_format_context, 0, 0, &options); if (e < 0) { throw OpenFileError (_ffmpeg_content->path(0).string(), e, OpenFileError::READ); @@ -322,7 +313,7 @@ FFmpeg::pts_offset (vector > audio_streams, option po = - first_video.get (); } - BOOST_FOREACH (shared_ptr i, audio_streams) { + for (auto i: audio_streams) { if (i->first_audio) { po = max (po, - i->first_audio.get ()); }