From d20341a8edd9d88719cf884606deb3c895f178c9 Mon Sep 17 00:00:00 2001 From: boeschy Date: Tue, 16 Jun 2026 17:41:02 +0200 Subject: [PATCH] fixed wrong aspect ratio for htab and hsbs videos --- .../VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp index f6392fd3fd0..4424ddebab3 100644 --- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp @@ -1509,9 +1509,19 @@ double CDVDDemuxFFmpeg::SelectAspect(AVStream* st, bool& forced) if (entry) { if (strcmp(entry->value, "left_right") == 0 || strcmp(entry->value, "right_left") == 0) - dar /= (st->codecpar->width / 1920.0); + { + if (st->codecpar->width > 1920) + dar /= (st->codecpar->width / 1920.0); + else + dar /= 2; + } else if (strcmp(entry->value, "top_bottom") == 0 || strcmp(entry->value, "bottom_top") == 0) - dar *= (st->codecpar->height / 1080.0); + { + if (st->codecpar->height > 1080) + dar *= (st->codecpar->height / 1080.0); + else + dar *= 2; + } } return dar; }