-/** Create an image for this frame.
- * @param note Handler for any notes that are made during the process.
+shared_ptr<Image>
+PlayerVideo::image (function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const
+{
+ /* XXX: this assumes that image() and prepare() are only ever called with the same parameters */
+
+ boost::mutex::scoped_lock lm (_mutex);
+ if (!_image) {
+ make_image (pixel_format, aligned, fast);
+ }
+ return _image;
+}
+
+/** Create an image for this frame. A lock must be held on _mutex.