Fix preset with normal aspect ratio

This commit is contained in:
Alexandru Pisarenco
2021-01-15 18:45:51 +01:00
parent 288d00d649
commit c95b48be07
2 changed files with 20 additions and 7 deletions

View File

@@ -15,3 +15,19 @@ def test_square_source():
assert info.resolution == Resolution(576, 576)
assert info.pixel_aspect_ratio == Ratio(16, 9)
def test_normal_source():
info = MediaInfo()
info.general = {
}
info.video = {
"Width": 1920,
"Height": 1080,
"DisplayAspectRatio": 1.778
}
info.determine_aspect_properties()
assert info.resolution == Resolution(1920, 1080)
assert info.pixel_aspect_ratio == Ratio(1, 1)