From 8b154a2808358e9682ec5da9d40573fc80c616df Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Fri, 1 Apr 2016 10:16:28 +0100 Subject: [PATCH] Fix minor bugs in PlaYUVerStream --- app/VideoSubWindow.cpp | 2 +- lib/PlaYUVerStream.cpp | 4 +++- lib/PlaYUVerStream.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index ed23be0..8374048 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -312,7 +312,7 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog ) Int InputFormat = PlaYUVerFrame::YUV420p; if( m_pCurrStream ) - m_pCurrStream->getFormat( Width, Height, InputFormat, BitsPel, FrameRate ); + m_pCurrStream->getFormat( Width, Height, InputFormat, BitsPel, Endianness, FrameRate ); if( !m_pCurrStream ) { diff --git a/lib/PlaYUVerStream.cpp b/lib/PlaYUVerStream.cpp index 853ef27..d4a3c49 100644 --- a/lib/PlaYUVerStream.cpp +++ b/lib/PlaYUVerStream.cpp @@ -462,7 +462,7 @@ Void PlaYUVerStream::close() m_bInit = false; } -Void PlaYUVerStream::getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBitsPerPel, UInt& rFrameRate ) +Void PlaYUVerStream::getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBitsPerPel, UInt& rEndianness, UInt& rFrameRate ) { if( m_bInit ) { @@ -470,6 +470,7 @@ Void PlaYUVerStream::getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, rHeight = m_uiHeight; rInputFormat = m_iPixelFormat; rBitsPerPel = m_uiBitsPerPixel; + rEndianness = m_uiEndianness; rFrameRate = m_dFrameRate; } else @@ -478,6 +479,7 @@ Void PlaYUVerStream::getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, rHeight = 0; rInputFormat = PlaYUVerFrame::YUV420p; rBitsPerPel = 8; + rEndianness = 0; rFrameRate = 30; } } diff --git a/lib/PlaYUVerStream.h b/lib/PlaYUVerStream.h index d0e65b2..27f5d82 100644 --- a/lib/PlaYUVerStream.h +++ b/lib/PlaYUVerStream.h @@ -105,7 +105,7 @@ public: Bool openFile(); Void closeFile(); - Void getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBitsPerPel, UInt& rFrameRate ); + Void getFormat( UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBitsPerPel, UInt& rEndianness, UInt& rFrameRate ); Void loadAll();