From a5d004b0773f633401528392fc28e66d70e13ac8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 4 Jan 2021 21:32:13 +0100 Subject: BOOST_FOREACH. --- src/lib/ffmpeg_decoder.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index ae4ab237f..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 @@ -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); } } -- cgit v1.2.3