Arch tweaks.
authorCarl Hetherington <cth@carlh.net>
Tue, 7 Jul 2015 18:47:53 +0000 (19:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 7 Jul 2015 18:47:53 +0000 (19:47 +0100)
src/lib/ffmpeg_audio_stream.cc
src/lib/sndfile_content.cc

index d71b65ff4ddb44597f3f788222eff17a60ee5620..d7fc7eaedf56b24dfdb768cea1c84c0fc122d82f 100644 (file)
 #include <libcxml/cxml.h>
 
 using std::string;
+using boost::optional;
 
 FFmpegAudioStream::FFmpegAudioStream (cxml::ConstNodePtr node, int version)
        : FFmpegStream (node)
        , AudioStream (node->number_child<int> ("FrameRate"), AudioMapping (node->node_child ("Mapping"), version))
 {
-       first_audio = node->optional_number_child<int64_t> ("FirstAudio");
+       optional<ContentTime::Type> const f = node->optional_number_child<ContentTime::Type> ("FirstAudio");
+       if (f) {
+               first_audio = ContentTime (f.get ());
+       }
 }
 
 void
index 6d3ee18f586dfc5b4a5b04d6768ecd42971e0deb..34096e50f33e0feab05bb4b8e83a8a039e6e81fe 100644 (file)
@@ -44,7 +44,7 @@ SndfileContent::SndfileContent (shared_ptr<const Film> film, boost::filesystem::
 SndfileContent::SndfileContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
        : Content (film, node)
        , SingleStreamAudioContent (film, node, version)
-       , _audio_length (node->number_child<int64_t> ("AudioLength"))
+       , _audio_length (node->number_child<Frame> ("AudioLength"))
 {
 
 }
@@ -109,4 +109,3 @@ SndfileContent::full_length () const
        FrameRateChange const frc = film->active_frame_rate_change (position ());
        return DCPTime::from_frames (audio_length() / frc.speed_up, audio_stream()->frame_rate ());
 }
-