Use a struct rather than a std::pair as the return type from ImageProxy::image.
[dcpomatic.git] / src / lib / ffmpeg_image_proxy.cc
index 9c91d1d87d7d6c60eb883ee346acbb14876bf5ee..87fb154d0a7741517e7fc0b35b47a75ee14f3c06 100644 (file)
@@ -112,13 +112,14 @@ FFmpegImageProxy::avio_seek (int64_t const pos, int whence)
        return _pos;
 }
 
-pair<shared_ptr<Image>, int>
+
+ImageProxy::Result
 FFmpegImageProxy::image (optional<dcp::Size>) const
 {
        boost::mutex::scoped_lock lm (_mutex);
 
        if (_image) {
-               return make_pair (_image, 0);
+               return Result (_image, 0);
        }
 
        uint8_t* avio_buffer = static_cast<uint8_t*> (wrapped_av_malloc(4096));
@@ -192,7 +193,7 @@ FFmpegImageProxy::image (optional<dcp::Size>) const
        av_free (avio_context->buffer);
        av_free (avio_context);
 
-       return make_pair (_image, 0);
+       return Result (_image, 0);
 }
 
 void