diff --git a/stepmania/src/RageMovieTexture.cpp b/stepmania/src/RageMovieTexture.cpp index a32e6b1c36..99c39720fa 100644 --- a/stepmania/src/RageMovieTexture.cpp +++ b/stepmania/src/RageMovieTexture.cpp @@ -106,6 +106,9 @@ void RageMovieTexture::Update(float fDeltaTime) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + /* XXX: We should use m_lVidPitch; we might be padded. However, I can't + * find any codec that don't force the width to a multiple of at least + * 4 anyway, so I can't test it, so I'll leave it like this for now. */ glPixelStorei(GL_UNPACK_ROW_LENGTH, m_iSourceWidth); glTexSubImage2D(GL_TEXTURE_2D, 0, diff --git a/stepmania/src/RageMovieTextureHelper.cpp b/stepmania/src/RageMovieTextureHelper.cpp index c146bd5506..5cc1791d7a 100644 --- a/stepmania/src/RageMovieTextureHelper.cpp +++ b/stepmania/src/RageMovieTextureHelper.cpp @@ -53,7 +53,7 @@ HRESULT CTextureRenderer::SetMediaType(const CMediaType *pmt) pviBmp = (VIDEOINFO *)pmt->Format(); m_lVidWidth = pviBmp->bmiHeader.biWidth; m_lVidHeight = abs(pviBmp->bmiHeader.biHeight); - m_lVidPitch = (m_lVidWidth * 3 + 3); // We are forcing RGB24 + m_lVidPitch = (m_lVidWidth * 3 + 3) + ~3; // We are forcing RGB24 return S_OK; }