X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=4bc88e1e4937ca2e896101ae8903c0539893cd7e;hb=182b9d2e2feb6545592868606aaf0f0146095481;hp=9017ad605dd9cb021e10e46bfcff307cc34c3f46;hpb=c7916079e06d985121842962b9736a6673e22dfe;p=dcpomatic.git diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 9017ad605..4bc88e1e4 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -90,7 +90,11 @@ get_optional_enum (cxml::ConstNodePtr node, string name) FFmpegContent::FFmpegContent (cxml::ConstNodePtr node, int version, list& notes) : Content (node) { - video = VideoContent::from_xml (this, node, version); + _color_range = get_optional_enum(node, "ColorRange"); + + VideoRange const video_range_hint = (_color_range && *_color_range == AVCOL_RANGE_JPEG) ? VideoRange::FULL : VideoRange::VIDEO; + + video = VideoContent::from_xml (this, node, version, video_range_hint); audio = AudioContent::from_xml (this, node, version); text = TextContent::from_xml (this, node, version, notes); @@ -124,7 +128,6 @@ FFmpegContent::FFmpegContent (cxml::ConstNodePtr node, int version, list _first_video = ContentTime (f.get ()); } - _color_range = get_optional_enum(node, "ColorRange"); _color_primaries = get_optional_enum(node, "ColorPrimaries"); _color_trc = get_optional_enum(node, "ColorTransferCharacteristic"); _colorspace = get_optional_enum(node, "Colorspace"); @@ -317,6 +320,7 @@ FFmpegContent::examine (shared_ptr film, shared_ptr job) text.clear (); text.push_back (make_shared(this, TextType::OPEN_SUBTITLE, TextType::UNKNOWN)); _subtitle_stream = _subtitle_streams.front (); + text.front()->add_font(make_shared("")); } }