出现该错误的原因是在于:视频的宽度必须是32的倍数,高度必须是2的倍数
解决方法:
if (screen_width % 32 != 0)
{
screen_width = screen_width / 32 * 32;
}
if (screen_height % 2 != 0)
{
screen_height = screen_height / 2 * 2;
}
本文介绍了解决视频宽度和高度导致的显示错误的方法。通过确保视频的宽度为32的倍数,高度为2的倍数来避免显示问题。提供了简单的代码实现。
出现该错误的原因是在于:视频的宽度必须是32的倍数,高度必须是2的倍数
解决方法:
if (screen_width % 32 != 0)
{
screen_width = screen_width / 32 * 32;
}
if (screen_height % 2 != 0)
{
screen_height = screen_height / 2 * 2;
}
1338
1269
2956
7426

被折叠的 条评论
为什么被折叠?