1
0
Fork 0
forked from len0rd/rockbox

MPEGPlayer: Fix a bug where seeking a stream into the same frame more than once in a row causes it to report itself at the end in error; to fix it, pause streams rather than stopping them if the playback isn't stopped. Also, add one check so the engine can at rewind unseekable files to time 0.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28862 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-12-20 07:58:02 +00:00
parent d215eb7c70
commit ea568794e7

View file

@ -330,8 +330,9 @@ static uint32_t stream_seek_intl(uint32_t time, int whence,
{
bool wb;
/* Place streams in a non-running state - keep them on actl */
actl_stream_broadcast(STREAM_STOP, 0);
/* Place streams in a non-running state - keep them on actl if
* still there */
actl_stream_broadcast(STREAM_PAUSE, 0);
/* Stop all buffering or else risk clobbering random-access data */
wb = disk_buf_send_msg(STREAM_STOP, 0);
@ -557,7 +558,8 @@ static void stream_on_seek(struct stream_seek_data *skd)
stream_mgr_lock();
if (stream_can_seek())
/* Either seeking must be possible or a full rewind must be done */
if (stream_can_seek() || time_from_whence(time, whence) == 0)
{
bool buffer;