From c8d7fb1c43c7c0d07d92f798f111cf4ca0fff6d9 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Tue, 10 Jan 2017 17:15:23 +0000 Subject: [PATCH] Fix guessing endian --- app/VideoSubWindow.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index 170a964..2a0bf15 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -538,16 +538,13 @@ Bool VideoSubWindow::guessFormat( QString filename, UInt& rWidth, UInt& rHeight, #endif // Guess Endianness - if( rEndianness == -1 ) + if( FilenameShort.contains( QStringLiteral( "be" ), Qt::CaseInsensitive ) ) { - if( FilenameShort.contains( QStringLiteral( "be" ), Qt::CaseInsensitive ) ) - { - rEndianness = PLAYUVER_BIG_ENDIAN; - } - if( FilenameShort.contains( QStringLiteral( "le" ), Qt::CaseInsensitive ) ) - { - rEndianness = PLAYUVER_LITTLE_ENDIAN; - } + rEndianness = PLAYUVER_BIG_ENDIAN; + } + if( FilenameShort.contains( QStringLiteral( "le" ), Qt::CaseInsensitive ) ) + { + rEndianness = PLAYUVER_LITTLE_ENDIAN; } if( rWidth > 0 && rHeight > 0 && rInputFormat >= 0 )