Skip to content

Commit

Permalink
Revert "heic: Recognize HEIC files only if they have gainmap"
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 703342844
  • Loading branch information
vigneshvg authored and copybara-github committed Dec 6, 2024
1 parent a6987b0 commit dc1b788
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/parser/mp4box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,12 @@ impl FileTypeBox {
pub fn is_avif(&self) -> bool {
// "avio" also exists but does not identify the file as AVIF on its own. See
// https://aomediacodec.github.io/av1-avif/v1.1.0.html#image-and-image-collection-brand
if self.has_brand_any(&["avif", "avis"]) {
return true;
}
match (cfg!(feature = "heic"), cfg!(android_soong)) {
(false, _) => false,
(true, false) => self.has_brand("heic"),
(true, true) => {
// This is temporary. For the Android Framework, recognize HEIC files only if they
// also contain a gainmap.
self.has_brand("heic") && self.has_tmap()
}
}
self.has_brand_any(&[
"avif",
"avis",
#[cfg(feature = "heic")]
"heic",
])
}

pub fn needs_meta(&self) -> bool {
Expand Down

0 comments on commit dc1b788

Please sign in to comment.