projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop crashing when running the hints check on films with silent/black gaps.
[dcpomatic.git]
/
src
/
lib
/
ffmpeg_image_proxy.cc
diff --git
a/src/lib/ffmpeg_image_proxy.cc
b/src/lib/ffmpeg_image_proxy.cc
index 3548117ff092e7847975cb9952ec9660ae35ba65..fa6cb288d28637ece3f55921cf69edb19fe1065e 100644
(file)
--- a/
src/lib/ffmpeg_image_proxy.cc
+++ b/
src/lib/ffmpeg_image_proxy.cc
@@
-146,7
+146,11
@@
FFmpegImageProxy::image (optional<dcp::Size>) const
e = avformat_open_input (&format_context, "foo.tga", f, &options);
}
if (e < 0) {
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, true);
+ } else {
+ boost::throw_exception(DecodeError(String::compose(_("Could not decode image (%1)"), e)));
+ }
}
if (avformat_find_stream_info(format_context, 0) < 0) {
}
if (avformat_find_stream_info(format_context, 0) < 0) {