Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 237dc91c authored by Ray Essick's avatar Ray Essick
Browse files

heic content_encoding field is optional

comply with the ISO spec that allows for content type fields to
be omitted in the mp4 header if they would be otherwise empty.

Bug: 74375003
Test: before/after of PoC
Change-Id: I522bacf192fee86122f603d6e87506e1a004f3f6
parent 438ce17e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1060,10 +1060,13 @@ status_t InfeBox::parse(off64_t offset, size_t size, ItemInfo *itemInfo) {
                return ERROR_MALFORMED;
            }

            // content_encoding is optional; can be omitted if would be empty
            if (size > 0) {
                String8 content_encoding;
                if (!parseNullTerminatedString(&offset, &size, &content_encoding)) {
                    return ERROR_MALFORMED;
                }
            }
        } else if (item_type == FOURCC('u', 'r', 'i', ' ')) {
            String8 item_uri_type;
            if (!parseNullTerminatedString(&offset, &size, &item_uri_type)) {