From: ghost Date: Tue, 20 Oct 2009 19:36:58 +0000 (+0200) Subject: fix audio track selection (also needs a small fix in gst-plugin-audiosink) X-Git-Tag: 2.6.0~9 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/9b9ac227931a2f378e45bddd5d3917816181b9b9 fix audio track selection (also needs a small fix in gst-plugin-audiosink) --- diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 95ec274d..a1c035ba 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -952,11 +952,17 @@ int eServiceMP3::getCurrentTrack() RESULT eServiceMP3::selectTrack(unsigned int i) { - int ret = selectAudioStream(i); - /* flush */ pts_t ppos; getPlayPosition(ppos); - seekTo(ppos); + ppos -= 90000; + if (ppos < 0) + ppos = 0; + + int ret = selectAudioStream(i); + if (!ret) { + /* flush */ + seekTo(ppos); + } return ret; }