Fix have same fmt and reload all

This commit is contained in:
jfmcarreira committed 2014-12-16 02:19:56 +00:00
1 parent b19dc41857
commit 84eb5a6849
2 files changed
+17 -7

No files matched your search

+9 -6
View File
@@ -353,15 +353,18 @@ Void plaYUVerApp::reload()
Void plaYUVerApp::reloadAll()
{
SubWindowHandle *subWindow;
for( Int i = 0; i < mdiArea->subWindowList().size(); i++ )
VideoSubWindow *subWindow;
QList<VideoSubWindow*> videoSubWindowList = mdiArea->findChildren<VideoSubWindow*>();
for( Int i = 0; i < videoSubWindowList.size(); i++ )
{
subWindow = qobject_cast<SubWindowHandle *>( mdiArea->subWindowList().at( i ) );
if( subWindow->getCategory() == SubWindowHandle::VIDEO_SUBWINDOW )
qobject_cast<VideoSubWindow*>( subWindow )->reloadFile();
subWindow = videoSubWindowList.at( i );
if( !subWindow->getIsModule() )
{
subWindow->reloadFile();
}
}
}
Void plaYUVerApp::loadAll()
{
if( m_pcCurrentVideoSubWindow )
+8 -1
View File
@@ -142,7 +142,14 @@ public:
}
Bool haveSameFmt( PlaYUVerFrame* other ) const
{
return ( m_uiWidth == other->getWidth() ) && ( m_uiHeight == other->getHeight() ) && ( m_iPixelFormat == other->getPelFormat() );
if( other )
{
return ( m_uiWidth == other->getWidth() ) && ( m_uiHeight == other->getHeight() ) && ( m_iPixelFormat == other->getPelFormat() );
}
else
{
return false;
}
}
Pel*** getPelBufferYUV() const
{