X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.cc;h=a5e86f22b8e352d529fa39e69149ad10cca9fec4;hb=001ba1644fc6aa54f91fcaaa62ae7e5de2313bc1;hp=440510ce562c9dbb13304a75f5f3a24e6f471eb2;hpb=ad1ef39eda58b3a919ea3b7084401a0439409ec6;p=dcpomatic.git diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index 440510ce5..a5e86f22b 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -35,6 +35,7 @@ using std::map; using std::pair; using boost::shared_ptr; using boost::optional; +using namespace dcpomatic; AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr content, bool fast) : DecoderPart (parent) @@ -110,7 +111,7 @@ AudioDecoder::stream_position (shared_ptr film, AudioStreamPtr strea return ContentTime::from_frames (i->second, _content->resampled_frame_rate(film)); } -ContentTime +boost::optional AudioDecoder::position (shared_ptr film) const { optional p; @@ -121,7 +122,7 @@ AudioDecoder::position (shared_ptr film) const } } - return p.get_value_or(ContentTime()); + return p; } void