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

Commit ab227470 authored by Iris Chang's avatar Iris Chang Committed by Wonsik Kim
Browse files

Support mkv whose hevc configurationVersion is not 1

Some mkv files may have hevc configurationVersion as 0
and we need to support them.

Bug:125176285
Test: Play a mkv file whose configurationVersion is 0
Change-Id: I946767c8e790b3d62d8feb2c588ae56b2cabedab
parent 2f5f0ace
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1101,7 +1101,9 @@ status_t convertMetaDataToMessage(
    } else if (meta->findData(kKeyHVCC, &type, &data, &size)) {
        const uint8_t *ptr = (const uint8_t *)data;

        if (size < 23 || ptr[0] != 1) {  // configurationVersion == 1
        if (size < 23 || (ptr[0] != 1 && ptr[0] != 0)) {
            // configurationVersion == 1 or 0
            // 1 is what the standard dictates, but some old muxers may have used 0.
            ALOGE("b/23680780");
            return BAD_VALUE;
        }