Fix some warnings

This commit is contained in:
jfmcarreira committed 2016-11-30 02:09:28 +00:00
1 parent 594b0eee1d
commit af6ec494a2
2 files changed
+4 -7

No files matched your search

+1 -4
View File
@@ -507,15 +507,12 @@ Bool VideoSubWindow::guessFormat( QString filename, UInt& rWidth, UInt& rHeight,
// Guess resolution by file size
if( rWidth == 0 && rHeight == 0 )
{
Char *filename_char = new char[filename.length() + 1];
memcpy( filename_char, filename.toUtf8().constData(), filename.length() + 1 * sizeof(char) );
FILE* pF = fopen( filename_char, "rb" );
FILE* pF = fopen( filename.toStdString().c_str(), "rb" );
if( pF )
{
fseek( pF, 0, SEEK_END );
UInt64 uiFileSize = ftell( pF );
fclose( pF );
delete[] filename_char;
Int count = 0, module, frame_bytes, match;
for( UInt i = 0; i < stdResList.size(); i++ )
+3 -3
View File
@@ -164,8 +164,8 @@ String PlaYUVerStream::getCodecName()
Bool PlaYUVerStream::open( String filename, String resolution, String input_format_name, UInt bitsPel, Int endianness, UInt frame_rate, Bool bInput )
{
UInt width;
UInt height;
UInt width = 0;
UInt height = 0;
Int input_format = -1;
if( resolution.size() > 0 )
@@ -575,7 +575,7 @@ Bool PlaYUVerStream::seekInputRelative( Bool bIsFoward )
Bool PlaYUVerStream::seekInput( UInt64 new_frame_num )
{
if( !m_bInit || new_frame_num < 0 || new_frame_num >= m_uiTotalFrameNum || ( Int64 )new_frame_num == m_iCurrFrameNum )
if( !m_bInit || new_frame_num >= m_uiTotalFrameNum || ( Int64 )new_frame_num == m_iCurrFrameNum )
return false;
m_iCurrFrameNum = new_frame_num - 1;