Skip to content

Commit 2b736bf

Browse files
committedJan 10, 2025·
fix parsing when auxC has no SEIs attached (fixes #1440)
1 parent 1630460 commit 2b736bf

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed
 

‎libheif/context.cc

+11-9
Original file line numberDiff line numberDiff line change
@@ -634,16 +634,18 @@ Error HeifContext::interpret_heif_file()
634634

635635
const auto& subtypes = auxC_property->get_subtypes();
636636

637-
std::vector<std::shared_ptr<SEIMessage>> sei_messages;
638-
Error err = decode_hevc_aux_sei_messages(subtypes, sei_messages);
639-
if (err) {
640-
return err;
641-
}
637+
if (!subtypes.empty()) {
638+
std::vector<std::shared_ptr<SEIMessage>> sei_messages;
639+
Error err = decode_hevc_aux_sei_messages(subtypes, sei_messages);
640+
if (err) {
641+
return err;
642+
}
642643

643-
for (auto& msg : sei_messages) {
644-
auto depth_msg = std::dynamic_pointer_cast<SEIMessage_depth_representation_info>(msg);
645-
if (depth_msg) {
646-
image->set_depth_representation_info(*depth_msg);
644+
for (auto& msg : sei_messages) {
645+
auto depth_msg = std::dynamic_pointer_cast<SEIMessage_depth_representation_info>(msg);
646+
if (depth_msg) {
647+
image->set_depth_representation_info(*depth_msg);
648+
}
647649
}
648650
}
649651
}

0 commit comments

Comments
 (0)
Please sign in to comment.