Branch: refs/heads/webkitglib/2.50
Home: https://github.com/WebKit/WebKit
Commit: cf04a07d599d362576410740b263b641d6e5d87f
https://github.com/WebKit/WebKit/commit/cf04a07d599d362576410740b263b641d6e5d87f
Author: Cristina Murillo <[email protected]>
Date: 2025-10-18 (Sat, 18 Oct 2025)
Changed paths:
A LayoutTests/media/content/video-with-large-par.mp4
A LayoutTests/media/video-large-pixel-aspect-ratio-expected.txt
A LayoutTests/media/video-large-pixel-aspect-ratio.html
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp
Log Message:
-----------
Cherry-pick 301767@main (2a29f6f8ced1).
https://bugs.webkit.org/show_bug.cgi?id=299529
[GStreamer] _gst_util_uint64_scale_int: assertion "num >= 0" failed
https://bugs.webkit.org/show_bug.cgi?id=299529
Reviewed by Philippe Normand.
Refactor the calculation of the display-aspect-ratio.
The calculation of the display width and height overflows if the values for
the pixel-aspect-ratio numerator and denominator are too large.
This patch refactors the code to separate the calculation of the
display-aspect-ratio into a separate and testable function.
The calculation for the display aspect ratio is replaced by
gst_video_calculate_display_ratio assumming a regular display (1:1),
maintaining the previous behavior.
A unittest has been added to verify the calculation with different sets of
width, height and pixel-aspect-ratio.
A layout test has been added to test the behavior when a video has a large
pixel-aspect-ratio.
The layout test video-large-pixel-aspect-ratio.html is disabled for the mac
platform. The test fails because the returned values for the width and the
height are zero.
Test: Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp
* LayoutTests/media/content/video-with-large-par.mp4: Added.
* LayoutTests/media/video-large-pixel-aspect-ratio-expected.txt: Added.
* LayoutTests/media/video-large-pixel-aspect-ratio.html: Added.
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::getDisplaySize):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
*
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateVideoSizeAndOrientationFromCaps):
* Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp:
(TestWebKitAPI::TEST_F(GStreamerTest, displayAspectRatioCalculation)):
Canonical link: https://commits.webkit.org/301767@main
Canonical link: https://commits.webkit.org/298234.204@webkitglib/2.50
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes