X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_decoder.cc;h=b050fc594a76f97ab72833c38792f62daf4f100d;hb=a5d004b0773f633401528392fc28e66d70e13ac8;hp=0d653906116a1ada85573e50e5eac357593d6be8;hpb=8798bfab1539c3ac6031bb325e1b181c58b13fc5;p=dcpomatic.git diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 0d6539061..b050fc594 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -51,7 +51,6 @@ extern "C" { #include #include } -#include #include #include #include @@ -68,11 +67,11 @@ using std::min; using std::pair; using std::max; using std::map; -using boost::shared_ptr; +using std::shared_ptr; using boost::is_any_of; using boost::split; using boost::optional; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using dcp::Size; using namespace dcpomatic; @@ -134,7 +133,7 @@ FFmpegDecoder::flush () } } - BOOST_FOREACH (shared_ptr i, _ffmpeg_content->ffmpeg_audio_streams ()) { + for (auto i: _ffmpeg_content->ffmpeg_audio_streams ()) { ContentTime a = audio->stream_position(film(), i); /* Unfortunately if a is 0 that really means that we don't know the stream position since there has been no data on it since the last seek. In this case we'll just do nothing @@ -400,7 +399,7 @@ FFmpegDecoder::seek (ContentTime time, bool accurate) } DCPOMATIC_DISABLE_WARNINGS - BOOST_FOREACH (shared_ptr i, ffmpeg_content()->ffmpeg_audio_streams()) { + for (auto i: ffmpeg_content()->ffmpeg_audio_streams()) { avcodec_flush_buffers (i->stream(_format_context)->codec); } DCPOMATIC_ENABLE_WARNINGS @@ -411,7 +410,7 @@ DCPOMATIC_ENABLE_WARNINGS _have_current_subtitle = false; - BOOST_FOREACH (optional& i, _next_time) { + for (auto& i: _next_time) { i = optional(); } } @@ -744,7 +743,7 @@ FFmpegDecoder::decode_ass_subtitle (string ass, ContentTime from) _ffmpeg_content->video->size().height ); - BOOST_FOREACH (sub::Subtitle const & i, sub::collect > (raw)) { + for (auto const& i: sub::collect > (raw)) { only_text()->emit_plain_start (from, i); } }