Skip to content

Commit b33b6fc

Browse files
committed
Store actual error as warning.
1 parent c7c3cb4 commit b33b6fc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

libheif/image-items/grid.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,7 @@ Result<std::shared_ptr<HeifPixelImage>> ImageItem_Grid::decode_full_grid_image(c
319319
if (auto error = tileImg->get_item_error()) {
320320
if (!options.strict_decoding && reference_idx != 0) {
321321
// Skip missing tiles (unless it's the first one).
322-
warnings.push_back(Error{
323-
heif_error_Invalid_input,
324-
heif_suberror_Missing_grid_images,
325-
});
322+
warnings.push_back(error);
326323
reference_idx++;
327324
x0 += tile_width;
328325
continue;
@@ -496,10 +493,7 @@ Error ImageItem_Grid::decode_and_paste_tile_image(heif_item_id tileID, uint32_t
496493
#if ENABLE_PARALLEL_TILE_DECODING
497494
std::lock_guard<std::mutex> lock(warningsMutex);
498495
#endif
499-
warnings.push_back(Error{
500-
heif_error_Invalid_input,
501-
heif_suberror_Missing_grid_images,
502-
});
496+
warnings.push_back(decodeResult.error());
503497
return progress_and_return_ok(options, progress_counter);
504498
}
505499

0 commit comments

Comments
 (0)