Commit a9066275 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Metadata: Force a default length to images.

parent b2f3666e
......@@ -53,6 +53,9 @@ namespace LibVLCpp
void setTime( qint64 time );
float getPosition();
void setPosition( float pos );
/**
\return The length, in milliseconds.
*/
qint64 getLength();
void takeSnapshot( const char* outputFile, unsigned int width, unsigned int heigth );
bool isPlaying();
......
......@@ -139,7 +139,10 @@ MetaDataWorker::metaDataAvailable()
double fps = VLMC_PROJECT_GET_DOUBLE( "video/VLMCOutputFPS" );
m_media->setFps( fps );
}
m_media->setLength( m_mediaPlayer->getLength() );
if ( m_media->fileType() == Media::Image )
m_media->setLength( 10000 );
else
m_media->setLength( m_mediaPlayer->getLength() );
m_media->setNbAudioTrack( m_mediaPlayer->getNbAudioTrack() );
m_media->setNbVideoTrack( m_mediaPlayer->getNbVideoTrack() );
......
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