diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-12-20 07:58:02 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-12-20 07:58:02 +0000 |
commit | ea568794e73d652282aaa881a4200b9e849e398b (patch) | |
tree | 9358228c8c9e1cd476b8f737c60bc1279688c646 | |
parent | d215eb7c70fdfa5f24c8329b330c96a35483969e (diff) | |
download | rockbox-ea568794e73d652282aaa881a4200b9e849e398b.tar.gz rockbox-ea568794e73d652282aaa881a4200b9e849e398b.zip |
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
-rw-r--r-- | apps/plugins/mpegplayer/stream_mgr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 67ec16cbb6..cee384fb75 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c | |||
@@ -330,8 +330,9 @@ static uint32_t stream_seek_intl(uint32_t time, int whence, | |||
330 | { | 330 | { |
331 | bool wb; | 331 | bool wb; |
332 | 332 | ||
333 | /* Place streams in a non-running state - keep them on actl */ | 333 | /* Place streams in a non-running state - keep them on actl if |
334 | actl_stream_broadcast(STREAM_STOP, 0); | 334 | * still there */ |
335 | actl_stream_broadcast(STREAM_PAUSE, 0); | ||
335 | 336 | ||
336 | /* Stop all buffering or else risk clobbering random-access data */ | 337 | /* Stop all buffering or else risk clobbering random-access data */ |
337 | wb = disk_buf_send_msg(STREAM_STOP, 0); | 338 | wb = disk_buf_send_msg(STREAM_STOP, 0); |
@@ -557,7 +558,8 @@ static void stream_on_seek(struct stream_seek_data *skd) | |||
557 | 558 | ||
558 | stream_mgr_lock(); | 559 | stream_mgr_lock(); |
559 | 560 | ||
560 | if (stream_can_seek()) | 561 | /* Either seeking must be possible or a full rewind must be done */ |
562 | if (stream_can_seek() || time_from_whence(time, whence) == 0) | ||
561 | { | 563 | { |
562 | bool buffer; | 564 | bool buffer; |
563 | 565 | ||