Fix fopen() on windows to cope with long filenames (part of #1755).
[dcpomatic.git] / src / lib / j2k_image_proxy.cc
index 064bbec7bbc3632c7f7366a941521356812ae64c..fcd1689cbf2df23190fbe5f10ae46d64d8075968 100644 (file)
@@ -29,7 +29,7 @@
 #include <dcp/stereo_picture_frame.h>
 #include <dcp/colour_conversion.h>
 #include <dcp/rgb_xyz.h>
-#include <dcp/j2k.h>
+#include <dcp/j2k_transcode.h>
 #include <libcxml/cxml.h>
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
@@ -43,9 +43,9 @@ using std::cout;
 using std::max;
 using std::pair;
 using std::make_pair;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::optional;
-using boost::dynamic_pointer_cast;
+using std::dynamic_pointer_cast;
 using dcp::ArrayData;
 using dcp::raw_convert;
 
@@ -85,7 +85,7 @@ J2KImageProxy::J2KImageProxy (
        AVPixelFormat pixel_format,
        optional<int> forced_reduction
        )
-       : _data (eye ? frame->left() : frame->right())
+       : _data (eye == dcp::Eye::LEFT ? frame->left() : frame->right())
        , _size (size)
        , _eye (eye)
        , _pixel_format (pixel_format)
@@ -221,6 +221,7 @@ J2KImageProxy::J2KImageProxy (ArrayData data, dcp::Size size, AVPixelFormat pixe
        : _data (new ArrayData(data))
        , _size (size)
        , _pixel_format (pixel_format)
+       , _error (false)
 {
        /* ::image assumes 16bpp */
        DCPOMATIC_ASSERT (_pixel_format == AV_PIX_FMT_RGB48 || _pixel_format == AV_PIX_FMT_XYZ12LE);