Merge pull request #6075 from MrTimscampi/codec-tag-hdr

Properly detect Dolby Vision files derived from AV1, AVC and HEVC
pull/6031/head
Claus Vium 4 years ago committed by GitHub
commit 45e27a3bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -104,6 +104,19 @@ namespace MediaBrowser.Model.Entities
return "HDR";
}
// For some Dolby Vision files, no color transfer is provided, so check the codec
var codecTag = CodecTag;
if (string.Equals(codecTag, "dva1", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codecTag, "dvav", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codecTag, "dvh1", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codecTag, "dvhe", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codecTag, "dav1", StringComparison.OrdinalIgnoreCase))
{
return "HDR";
}
return "SDR";
}
}

Loading…
Cancel
Save