Files
mc_video_player_mod/gradle.properties
tkrmagid e31635ef24
Some checks failed
build / build (push) Failing after 1m41s
Fix black-screen video on unaligned widths (swscale row padding)
swscale aligns the RGBA linesize to a SIMD boundary, so any video whose
width*4 isn't a multiple of the alignment (e.g. 1674-wide → 6720 B/row vs
6696) yields a padded plane larger than width*height*4. The old copy path
tripped a `need > expected → skip` guard and dropped every video frame,
leaving a black screen while audio (independent path) still played.

Read Frame.imageStride and strip the row padding with a row-by-row memCopy
into a tightly-packed slot (width*height*4), matching the texture's expected
size. Falls back to deriving the stride from buffer size when the field is
absent. Single-shot memCopy retained when stride == rowBytes (aligned widths).

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-02 00:59:44 +09:00

457 B