From dc1b78821678dcd763c42e9c7d9bf88224989675 Mon Sep 17 00:00:00 2001 From: Vignesh Venkat Date: Thu, 5 Dec 2024 20:17:14 -0800 Subject: [PATCH] Revert "heic: Recognize HEIC files only if they have gainmap" PiperOrigin-RevId: 703342844 --- src/parser/mp4box.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/parser/mp4box.rs b/src/parser/mp4box.rs index fa1f2b0..9ab506f 100644 --- a/src/parser/mp4box.rs +++ b/src/parser/mp4box.rs @@ -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 {