From 8ef7317b5748b294f033dd58c6d654d198f731e5 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 11 Oct 2006 10:23:31 +0000 Subject: [PATCH] Casting an rvalue to nonconst reference is illegal. I'm not positive why these are considered to be rvalues when they are cast. --- .../src/arch/MovieTexture/MovieTexture_FFMpeg.cpp | 5 ++++- .../src/arch/MovieTexture/MovieTexture_Theora.cpp | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp index 5334bd175d..b80345f6e3 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +++ b/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp @@ -589,7 +589,10 @@ void MovieDecoder_FFMpeg::Close() RageSurface *MovieDecoder_FFMpeg::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor ) { - return MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, (int&) m_AVTexfmt ); + int temp = m_AVTexfmt; + RageSurface *surface = MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, temp ); + m_AVTexfmt = avcodec::PixelFormat( temp ); + return surface; } MovieTexture_FFMpeg::MovieTexture_FFMpeg( RageTextureID ID ): diff --git a/stepmania/src/arch/MovieTexture/MovieTexture_Theora.cpp b/stepmania/src/arch/MovieTexture/MovieTexture_Theora.cpp index 7b2e6453ba..a5073ae2d6 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture_Theora.cpp +++ b/stepmania/src/arch/MovieTexture/MovieTexture_Theora.cpp @@ -267,7 +267,10 @@ int MovieDecoder_Theora::GetFrame( RageSurface *pOut, float fTargetTime ) RageSurface *MovieDecoder_Theora::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor ) { - return MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, (int&) m_OutputPixFmt ); + int temp = m_OutputPixFmt; + RageSurface *surface = MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, temp ); + m_OutputPixFmt = avcodec::PixelFormat( temp ); + return surface; } void MovieDecoder_Theora::ConvertToSurface( RageSurface *pSurface ) const @@ -604,7 +607,10 @@ int MovieDecoder_Theora::GetFrame( RageSurface *pOut, float fTargetTime ) RageSurface *MovieDecoder_Theora::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor ) { - return MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, (int&) m_OutputPixFmt ); + int temp = m_OutputPixFmt; + RageSurface *surface = MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, temp ); + m_OutputPixFmt = avcodec::PixelFormat( temp ); + return surface; } void MovieDecoder_Theora::DecodeStripeStub( void *pCtx, theora_ycbcr_buffer yuv, int yfrag0, int yfrag_end )