[vlc-commits] [Git][videolan/vlc][master] demux: mkv: fix the Display Aspect Ratio to Sample Aspect Ratio conversion

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Sep 18 11:19:10 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
74a3aae6 by Steve Lhomme at 2026-09-18T11:03:41+00:00
demux: mkv: fix the Display Aspect Ratio to Sample Aspect Ratio conversion

A 1280x720 with a DAR of 1:1 should display as a square but instead it's
very elongated.

Fixes #30131

- - - - -


1 changed file:

- modules/demux/mkv/matroska_segment_parse.cpp


Changes:

=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -608,7 +608,7 @@ void matroska_segment_c::ParseTrackEntry( const KaxTrackEntry *m )
                                      i_display_height * tk->fmt.video.i_visible_width, 0);
                         break;
                     case 3: // display aspect ratio
-                        vlc_ureduce( &tk->fmt.video.i_sar_num, &tk->fmt.video.i_sar_den,
+                        vlc_ureduce( &tk->fmt.video.i_sar_den, &tk->fmt.video.i_sar_num,
                                      i_display_height * tk->fmt.video.i_visible_width,
                                      i_display_width * tk->fmt.video.i_visible_height, 0);
                         break;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/74a3aae62eebb8cc404827d2b8adbe12fd3b1419

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/74a3aae62eebb8cc404827d2b8adbe12fd3b1419
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