Another macOS std::list boost::thread SNAFU.
[dcpomatic.git] / src / lib / ffmpeg_image_proxy.cc
index 3548117ff092e7847975cb9952ec9660ae35ba65..9c91d1d87d7d6c60eb883ee346acbb14876bf5ee 100644 (file)
@@ -146,7 +146,11 @@ FFmpegImageProxy::image (optional<dcp::Size>) const
                e = avformat_open_input (&format_context, "foo.tga", f, &options);
        }
        if (e < 0) {
-               throw OpenFileError (_path->string(), e, true);
+               if (_path) {
+                       throw OpenFileError (_path->string(), e, OpenFileError::READ);
+               } else {
+                       boost::throw_exception(DecodeError(String::compose(_("Could not decode image (%1)"), e)));
+               }
        }
 
        if (avformat_find_stream_info(format_context, 0) < 0) {