projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba82749
)
Give a better error when FFmpegImageProxy fails to decode an image that was passed...
author
Carl Hetherington
<cth@carlh.net>
Fri, 15 Mar 2019 22:37:47 +0000
(22:37 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 15 Mar 2019 22:37:47 +0000
(22:37 +0000)
src/lib/ffmpeg_image_proxy.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_image_proxy.cc
b/src/lib/ffmpeg_image_proxy.cc
index 3548117ff092e7847975cb9952ec9660ae35ba65..33c619a2d92c5c6938e2a1a5f777ccce39326ae4 100644
(file)
--- a/
src/lib/ffmpeg_image_proxy.cc
+++ b/
src/lib/ffmpeg_image_proxy.cc
@@
-146,7
+146,12
@@
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, true);
+ } else {
+ /* XXX: this needs to be marked translatable after the string freeze is over */
+ boost::throw_exception(DecodeError(String::compose("Could not decode image (%1)", e)));
+ }
}
if (avformat_find_stream_info(format_context, 0) < 0) {