Assorted C++11/formatting cleanups.
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 3f0ac8a7d2cd1f0da0fd44b7e7bd303040784e15..147bb384f3eb1bad5a811adf9d624501b69eedf4 100644 (file)
@@ -103,7 +103,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const Film> film, shared_ptr<const FFmp
        }
 
        for (auto i: c->ffmpeg_audio_streams()) {
-               _next_time[i] = {};
+               _next_time[i] = boost::optional<dcpomatic::ContentTime>();
        }
 }
 
@@ -234,6 +234,7 @@ DCPOMATIC_DISABLE_WARNINGS
                0, stream->stream(_format_context)->codec->channels, _frame->nb_samples, audio_sample_format (stream), 1
                );
 DCPOMATIC_ENABLE_WARNINGS
+       DCPOMATIC_ASSERT (size >= 0);
 
        /* XXX: can't we just use _frame->nb_samples directly here? */
        /* XXX: can't we use swr_convert() to do the format conversion? */
@@ -444,7 +445,7 @@ DCPOMATIC_ENABLE_WARNINGS
        _have_current_subtitle = false;
 
        for (auto& i: _next_time) {
-               i.second = {};
+               i.second = boost::optional<dcpomatic::ContentTime>();
        }
 }