More informative error message for image decoding failure. (flutter/engine#4389)
This commit is contained in:
@@ -75,7 +75,8 @@ fxl::RefPtr<Codec> InitCodec(sk_sp<SkData> buffer, size_t trace_id) {
|
||||
|
||||
std::unique_ptr<SkCodec> skCodec = SkCodec::MakeFromData(buffer);
|
||||
if (!skCodec) {
|
||||
FXL_LOG(ERROR) << "SkCodec::MakeFromData failed";
|
||||
FXL_LOG(ERROR) << "Failed decoding image. Data is either invalid, or it is "
|
||||
"encoded using an unsupported format.";
|
||||
return nullptr;
|
||||
}
|
||||
if (skCodec->getFrameCount() > 1) {
|
||||
|
||||
Reference in New Issue
Block a user