diff --git a/source/lib/PlaYUVerFrame.cpp b/source/lib/PlaYUVerFrame.cpp index 99e198b..8b2b827 100755 --- a/source/lib/PlaYUVerFrame.cpp +++ b/source/lib/PlaYUVerFrame.cpp @@ -39,9 +39,9 @@ PlaYUVerFrame::PlaYUVerFrame( UInt width, UInt height, Int pel_format ) m_iPixelFormat = pel_format; m_iNumberChannels = 3; Int max_bits_per_pel = sizeof( Pel ) * 8; - m_iBitsChannels = assert( 8 <= max_bits_per_pel ); + m_iBitsChannels = 8; - if( m_uiWidth == 0 || m_uiWidth == 0 || m_iPixelFormat == -1 ) + if( m_uiWidth == 0 || m_uiHeight == 0 || m_iPixelFormat == -1 || m_iBitsChannels > max_bits_per_pel ) { return; } diff --git a/source/lib/PlaYUVerFrame.h b/source/lib/PlaYUVerFrame.h index 4f36cd4..743cb66 100755 --- a/source/lib/PlaYUVerFrame.h +++ b/source/lib/PlaYUVerFrame.h @@ -126,7 +126,6 @@ public: { return m_iBitsChannels; } - Bool isValid() const { return ( m_uiWidth > 0 ) && ( m_uiHeight > 0 ) && ( m_iPixelFormat >= 0 ); @@ -137,7 +136,7 @@ private: UInt m_uiHeight; Int m_iPixelFormat; Int m_iNumberChannels; - Int m_iBitsChannels + Int m_iBitsChannels; Bool m_bHasRGBPel; Pel*** m_pppcInputPel;