Speculative Arch fix.
authorCarl Hetherington <cth@carlh.net>
Wed, 8 Jul 2015 23:50:41 +0000 (00:50 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 8 Jul 2015 23:50:41 +0000 (00:50 +0100)
src/lib/ffmpeg_content.cc

index cb887b3bb342b37922534899d38ab73d0000af3a..f8a1a142a75b40dcb5877ec33d5097319d00f400 100644 (file)
@@ -50,6 +50,7 @@ using std::pair;
 using std::make_pair;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
+using boost::optional;
 
 int const FFmpegContentProperty::SUBTITLE_STREAMS = 100;
 int const FFmpegContentProperty::SUBTITLE_STREAM = 101;
@@ -97,7 +98,10 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no
                }
        }
 
-       _first_video = node->optional_number_child<double> ("FirstVideo");
+       optional<ContentTime::Type> const f = node->optional_number_child<ContentTime::Type> ("FirstVideo");
+       if (f) {
+               _first_video = ContentTime (f.get ());
+       }
 
        _color_range = static_cast<AVColorRange> (node->optional_number_child<int>("ColorRange").get_value_or (AVCOL_RANGE_UNSPECIFIED));
        _color_primaries = static_cast<AVColorPrimaries> (node->optional_number_child<int>("ColorPrimaries").get_value_or (AVCOL_PRI_UNSPECIFIED));