From a04e7f3054f0d99c8f54863142d096bc655a4bc9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Jul 2015 00:50:41 +0100 Subject: [PATCH] Speculative Arch fix. --- src/lib/ffmpeg_content.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index cb887b3bb..f8a1a142a 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -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 film, cxml::ConstNodePtr no } } - _first_video = node->optional_number_child ("FirstVideo"); + optional const f = node->optional_number_child ("FirstVideo"); + if (f) { + _first_video = ContentTime (f.get ()); + } _color_range = static_cast (node->optional_number_child("ColorRange").get_value_or (AVCOL_RANGE_UNSPECIFIED)); _color_primaries = static_cast (node->optional_number_child("ColorPrimaries").get_value_or (AVCOL_PRI_UNSPECIFIED)); -- 2.30.2