1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-19 12:21:52 +02:00

added quick fix for libvlc not seeking correctly to an end for some tracks

This commit is contained in:
Tomasz Woźniak
2015-10-05 20:04:17 +02:00
parent 193beda2bc
commit e6a8a41c31

View File

@@ -431,6 +431,11 @@ AudioOutput::seek( qint64 milliseconds )
{ {
// tDebug() << Q_FUNC_INFO << "AudioOutput:: seeking" << milliseconds << "msec"; // tDebug() << Q_FUNC_INFO << "AudioOutput:: seeking" << milliseconds << "msec";
// for some tracks, seeking to an end seems not to work correctly with libvlc
// (tracks enter a random and infinite loop) - this is a temporary fix for that
if (milliseconds == libvlc_media_player_get_length(m_vlcPlayer) && milliseconds > 0)
milliseconds -= 1;
libvlc_media_player_set_time( m_vlcPlayer, milliseconds ); libvlc_media_player_set_time( m_vlcPlayer, milliseconds );
setCurrentTime( milliseconds ); setCurrentTime( milliseconds );
} }