Fix missing YUVToRGB node when saving colour conversions (#618).
authorCarl Hetherington <cth@carlh.net>
Mon, 22 Jun 2015 23:42:12 +0000 (00:42 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 22 Jun 2015 23:42:12 +0000 (00:42 +0100)
ChangeLog
src/lib/colour_conversion.cc

index 85c61c9282ae08569d5a3b367afcd1f4c4161131..9acee434f9043d1812dc24a9cde887c0d949b076 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-23  Carl Hetherington  <cth@carlh.net>
+
+       * Fix incorrect saving of colour conversion settings (#618).
+
 2015-06-21  Carl Hetherington  <cth@carlh.net>
 
        * Add some more video properties to the content properties
index 31d4cc41a6dc3f33836015a9d87b3a68a0a39ab2..29783e2892d8b8ad274ac48ba8ce468329495cb3 100644 (file)
@@ -149,6 +149,7 @@ ColourConversion::as_xml (xmlpp::Node* node) const
                in_node->add_child("B")->add_child_text (raw_convert<string> (tf->B ()));
        }
 
+       node->add_child("YUVToRGB")->add_child_text (raw_convert<string> (_yuv_to_rgb));
        node->add_child("RedX")->add_child_text (raw_convert<string> (_red.x));
        node->add_child("RedY")->add_child_text (raw_convert<string> (_red.y));
        node->add_child("GreenX")->add_child_text (raw_convert<string> (_green.x));
@@ -170,7 +171,7 @@ ColourConversion::preset () const
 {
        vector<PresetColourConversion> presets = PresetColourConversion::all ();
        size_t i = 0;
-       while (i < presets.size() && (presets[i].conversion != *this)) {
+       while (i < presets.size() && presets[i].conversion != *this) {
                ++i;
        }
 
@@ -275,4 +276,3 @@ PresetColourConversion::from_id (string s)
 
        DCPOMATIC_ASSERT (false);
 }
-