summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2002-08-25 05:11:25 +0000
committerHardeep Sidhu <dyp@pobox.com>2002-08-25 05:11:25 +0000
commitc674415a162dbe8776197f82850a35339b61d632 (patch)
tree2ffb5ba8a58910bd36232bcfe7203c5c66d53c9b /firmware
parente60a999ca08545b8e699b6b8439387b66d390e38 (diff)
downloadrockbox-c674415a162dbe8776197f82850a35339b61d632.tar.gz
rockbox-c674415a162dbe8776197f82850a35339b61d632.zip
Make sure there is sufficient data in buffer before resuming after ffw.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1970 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 6f2b3dfafe..d19cdf65e4 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -953,11 +953,18 @@ static void mpeg_thread(void)
953 mp3buf_read += mp3buflen; 953 mp3buf_read += mp3buflen;
954 } 954 }
955 955
956 playing = true; 956 if (get_unplayed_space() < MPEG_LOW_WATER)
957 last_dma_tick = current_tick; 957 {
958 init_dma(); 958 /* We need to load more data before starting */
959 if (!paused) 959 filling = true;
960 start_dma(); 960 queue_post(&mpeg_queue, MPEG_NEED_DATA, 0);
961 play_pending = true;
962 }
963 else
964 {
965 /* resume will start at new position */
966 init_dma();
967 }
961 } 968 }
962 else 969 else
963 { 970 {