[vlc-commits] [Git][videolan/vlc][master] macosx: Only assign resolution label on track if track is of video type
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Thu Sep 10 16:16:57 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
71755256 by Claudio Cambra at 2026-09-10T18:06:36+02:00
macosx: Only assign resolution label on track if track is of video type
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryDataTypes.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryDataTypes.m
=====================================
@@ -249,17 +249,19 @@ static NSString *genreArrayDisplayString(NSArray<VLCMediaLibraryGenre *> * const
_frameRate = p_track->v.i_fpsNum;
_frameRateDenominator = p_track->v.i_fpsDen;
- const unsigned int realHeight = MIN(_videoWidth, _videoHeight);
- const unsigned int realWidth = MAX(_videoWidth, _videoHeight);
-
- if (realHeight >= VLCMediaLibrary8KHeight || realWidth >= VLCMediaLibrary8KHeight * (16.0 / 9.0)) {
- _resolutionLabel = _NS("8K");
- } else if (realHeight >= VLCMediaLibrary4KHeight || realWidth >= VLCMediaLibrary4KHeight * (16.0 / 9.0)) {
- _resolutionLabel = _NS("4K");
- } else if (realHeight >= VLCMediaLibrary1080pHeight || realWidth >= VLCMediaLibrary1080pHeight * (16.0 / 9.0)) {
- _resolutionLabel = _NS("HD");
- } else if (realHeight >= VLCMediaLibrary540pHeight || realWidth >= VLCMediaLibrary540pHeight * (16.0 / 9.0)) {
- _resolutionLabel = _NS("SD");
+ if (p_track->i_type == VLC_ML_TRACK_TYPE_VIDEO) {
+ const unsigned int realHeight = MIN(_videoWidth, _videoHeight);
+ const unsigned int realWidth = MAX(_videoWidth, _videoHeight);
+
+ if (realHeight >= VLCMediaLibrary8KHeight || realWidth >= VLCMediaLibrary8KHeight * (16.0 / 9.0)) {
+ _resolutionLabel = _NS("8K");
+ } else if (realHeight >= VLCMediaLibrary4KHeight || realWidth >= VLCMediaLibrary4KHeight * (16.0 / 9.0)) {
+ _resolutionLabel = _NS("4K");
+ } else if (realHeight >= VLCMediaLibrary1080pHeight || realWidth >= VLCMediaLibrary1080pHeight * (16.0 / 9.0)) {
+ _resolutionLabel = _NS("HD");
+ } else if (realHeight >= VLCMediaLibrary540pHeight || realWidth >= VLCMediaLibrary540pHeight * (16.0 / 9.0)) {
+ _resolutionLabel = _NS("SD");
+ }
}
}
return self;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7175525613b0d81b81acce8bf254143f9fa1dc14
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7175525613b0d81b81acce8bf254143f9fa1dc14
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list