Commit bbab1db1 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Added failsafe behaviour for length computing.

However, it would be a really good idea to implement the FPS computation for such medias...
parent 6012054c
......@@ -89,6 +89,11 @@ void MetaDataWorker::getMetaData()
m_currentMedia->setWidth( m_mediaPlayer->getWidth() );
m_currentMedia->setHeight( m_mediaPlayer->getHeight() );
m_currentMedia->setFps( m_mediaPlayer->getFps() );
if ( m_currentMedia->getFps() == .0f )
{
qWarning() << "Invalid FPS for media:" << m_currentMedia->getFileInfo()->absoluteFilePath();
m_currentMedia->setFps( FPS );
}
m_currentMedia->setNbFrames( m_currentMedia->getLength() / 1000 * m_currentMedia->getFps() );
//Setting time for snapshot :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment