Do not set the hd video tag if the movie is 4k.

This commit is contained in:
Damiano Galassi committed 2019-11-13 13:44:43 +01:00
1 parent 6dc86fe9bb
commit 4f2da7ba58
1 file changed
+3 -3
+3 -3
View File
@@ -26,9 +26,9 @@ extension MP42File {
var hdType: TrackHDType? {
for track in tracks(withMediaType: kMP42MediaType_Video) as! [MP42VideoTrack] {
/*if (track.width > 1920 && track.height > 1088) {
return .hd4k
} else */ if (track.width > 1280 || track.height > 720) /*&& track.width <= 1920 && track.height <= 1088*/ {
if (track.width > 1920 && track.height > 1088) {
return nil // .hd4k 4k breaks AppleTV streaming
} else if (track.width > 1280 || track.height > 720) && track.width <= 1920 && track.height <= 1088 {
return .hd1080p
} else if track.width >= 960 && track.height >= 720 || track.width >= 1280 {
return .hd720p