Avoid playing sequences with one frame only

This commit is contained in:
jfmcarreira committed 2014-06-26 01:59:58 +01:00
1 parent 947f7ed80a
commit 13e34a2269
3 files changed
+18 -13

No files matched your search

+7 -10
View File
@@ -456,29 +456,26 @@ Void plaYUVerApp::play()
if( m_arrayActions[VIDEO_LOCK_ACT]->isChecked() && m_acPlayingSubWindows.size() )
{
Bool bFind = false;
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
if( !m_acPlayingSubWindows.contains( m_pcCurrentSubWindow ) )
{
if( m_acPlayingSubWindows.at( i ) == m_pcCurrentSubWindow )
if( !m_pcCurrentSubWindow->play() )
{
bFind = true;
break;
return;
}
}
if( !bFind )
{
m_acPlayingSubWindows.append( m_pcCurrentSubWindow );
m_pcCurrentSubWindow->seekAbsoluteEvent( m_acPlayingSubWindows.at( 0 )->getInputStream()->getCurrFrameNum() );
updateTotalFrameNum();
}
m_pcCurrentSubWindow->play();
}
else
{
m_pcPlayingTimer->stop();
m_acPlayingSubWindows.clear();
if( !m_pcCurrentSubWindow->play() )
{
return;
}
m_acPlayingSubWindows.append( m_pcCurrentSubWindow );
m_pcCurrentSubWindow->play();
m_uiAveragePlayInterval = 0;
m_bIsPlaying = false;
}