opengl/gltexture: use image stride when uploading
Some clients might send buffers with stride larger than its width. Check for this and set GL_UNPACK_ROW_LENGTH as necessary. In case this is not supported (GL ES), pack the bytes first using a CPU copy.
See-also: https://github.com/mpv-player/mpv/issues/13961
Before | After |
---|---|
![]() |
![]() |