commit bb0b31f3ebafce60e83572469c14c3ac1f87f822
parent 5169142fdc837bc196c540cf794510de3fb3521c
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 22 Jun 2024 11:49:45 +0200
make cr3 work
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/sdk/src/asset_handlers/bmff_io.rs b/sdk/src/asset_handlers/bmff_io.rs
@@ -65,7 +65,7 @@ const FULL_BOX_TYPES: &[&str; 80] = &[
"txtC", "mime", "uri ", "uriI", "hmhd", "sthd", "vvhd", "medc",
];
-static SUPPORTED_TYPES: [&str; 13] = [
+static SUPPORTED_TYPES: [&str; 14] = [
"avif",
"heif",
"heic",
@@ -79,6 +79,7 @@ static SUPPORTED_TYPES: [&str; 13] = [
"image/heif",
"video/mp4",
"video/quicktime",
+ "cr3",
];
macro_rules! boxtype {
diff --git a/sdk/src/utils/mime.rs b/sdk/src/utils/mime.rs
@@ -42,6 +42,8 @@ pub fn extension_to_mime(extension: &str) -> Option<&'static str> {
"arw" => "image/x-sony-arw",
"nef" => "image/x-nikon-nef",
"c2pa" | "application/x-c2pa-manifest-store" | "application/c2pa" => "application/c2pa",
+ "cr2" => "image/x-canon-cr2",
+ "cr3" => "image/x-canon-cr3",
_ => return None,
})
}