In case of hardware decoding of H.264 video with dimensions that are not macroblock aligned, e.g. 1080x1920, the VideoMeta might indicate the actual physical dimensions of the buffer containing the decoded video data, as written by the hardware decoder, that is 1088x1920 instead of 1080x1920 . This leads to an 8px wide stripe of corrupted pixels at the edge of the displayed video. The valid video data are a subset of that buffer content and their dimensions can be obtained from caps. The code already stores those dimensions in m_videoSize, so in case m_videoSize is not empty, use dimensions from m_videoSize instead of the buffer dimensions. This happens on NXP i.MX8M Plus with Hantro G1 VPU . This fix is similar to GStreamer commit: 0b648f9a2d1e ("waylandsink: Crop surfaces to their display width height") https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/0b648f9a2d1e
PR https://github.com/WebKit/WebKit/pull/23543
Committed 273819@main (b3d3dc5c2be0): <https://commits.webkit.org/273819@main> Reviewed commits have been landed. Closing PR #23543 and removing active labels.
<rdar://problem/121999536>