Skip to content

Commit

Permalink
fix #679
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Dec 4, 2023
1 parent 479f658 commit e8eb3b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/KSPlayer/AVPlayer/KSAVPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,11 @@ class AVMediaPlayerTrack: MediaPlayerTrack {
isPlayable = track.assetTrack?.isPlayable ?? false
#endif
// swiftlint:disable force_cast
formatDescription = (track.assetTrack?.formatDescriptions.first as! CMFormatDescription)
if let first = track.assetTrack?.formatDescriptions.first {
formatDescription = first as! CMFormatDescription
} else {
formatDescription = nil
}
// swiftlint:enable force_cast
description = (formatDescription?.mediaSubType ?? .boxed).rawValue.string
#if os(xrOS)
Expand Down

0 comments on commit e8eb3b7

Please sign in to comment.