From 875be15939cb4740e695af3178f925d067746b43 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 8 Dec 2021 12:09:58 +0100 Subject: [PATCH] Read dvh1 magic cookie in AVFoundation importer. --- MP42/MP42AVFImporter.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MP42/MP42AVFImporter.m b/MP42/MP42AVFImporter.m index 773a587..00e3e6a 100644 --- a/MP42/MP42AVFImporter.m +++ b/MP42/MP42AVFImporter.m @@ -849,13 +849,14 @@ MP42_OBJC_DIRECT_MEMBERS CFDictionaryRef atoms = CFDictionaryGetValue(extentions, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms); CFDataRef magicCookie = NULL; - if (code == kCMVideoCodecType_H264) { + if (code == kCMVideoCodecType_H264 || code == kMP42VideoCodecType_DolbyVisionH264) { magicCookie = CFDictionaryGetValue(atoms, @"avcC"); } - else if (code == kCMVideoCodecType_HEVC || code == 'hev1') { + else if (code == kCMVideoCodecType_HEVC || code == kMP42VideoCodecType_HEVC_PSinBitstream || + code == kCMVideoCodecType_DolbyVisionHEVC || code == kMP42VideoCodecType_DolbyVisionHEVC_PSinBitstream) { magicCookie = CFDictionaryGetValue(atoms, @"hvcC"); } - else if (code == 'av01') { + else if (code == kMP42VideoCodecType_AV1) { magicCookie = CFDictionaryGetValue(atoms, @"av1C"); } else if (code == kCMVideoCodecType_MPEG4Video) {