Skip to content

Commit

Permalink
url-box: parse 'data-in-same-file' flag
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Sep 12, 2024
1 parent 4563a2f commit 487318c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libheif/box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3726,7 +3726,13 @@ Error Box_url::parse(BitstreamRange& range)
return unsupported_version_error("url");
}

m_location = range.read_string();
if (get_flags() & 1) {
// data in same file
m_location.clear();
}
else {
m_location = range.read_string();
}

return range.get_error();
}
Expand Down
2 changes: 2 additions & 0 deletions libheif/box.h
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,8 @@ class Box_url : public FullBox
public:
std::string dump(Indent&) const override;

bool is_same_file() const { return m_location.empty(); }

protected:
Error parse(BitstreamRange& range) override;

Expand Down

0 comments on commit 487318c

Please sign in to comment.