mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-08-26 08:26:59 -04:00
heif: re-enable decoding of non-standard images
BUG: 495686
IMG_20241019_195232.heic stopped decoding recently because
buffer.contains("Xiaomi") is almost all the time false
(only start of the file is stored now),
except sequential devices (full file is stored).
This commit is contained in:
@@ -951,8 +951,8 @@ bool HEIFHandler::ensureDecoder()
|
|||||||
struct heif_image *img = nullptr;
|
struct heif_image *img = nullptr;
|
||||||
err = heif_decode_image(handle, &img, heif_colorspace_RGB, chroma, decoder_option);
|
err = heif_decode_image(handle, &img, heif_colorspace_RGB, chroma, decoder_option);
|
||||||
|
|
||||||
if (err.code == heif_error_Invalid_input && err.subcode == heif_suberror_Unknown_NCLX_matrix_coefficients && img == nullptr && buffer.contains("Xiaomi")) {
|
if (err.code == heif_error_Invalid_input && err.subcode == heif_suberror_Unknown_NCLX_matrix_coefficients && img == nullptr) {
|
||||||
qCWarning(LOG_HEIFPLUGIN) << "Non-standard HEIF image with invalid matrix_coefficients, probably made by a Xiaomi device!";
|
qCWarning(LOG_HEIFPLUGIN) << "Non-standard HEIF image with invalid matrix_coefficients!";
|
||||||
|
|
||||||
// second try to decode with strict decoding disabled
|
// second try to decode with strict decoding disabled
|
||||||
decoder_option->strict_decoding = 0;
|
decoder_option->strict_decoding = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user