summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-04-01 21:58:50 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-04-01 21:58:50 +0000
commit921848119960cd016111d6497db3fae33c120d55 (patch)
treeb0613400b93673fe5208e13b02c23705e1dcadc8 /firmware
parenta67e8ec52f9dbaca6af52ddf92fbfbaa1074d1b3 (diff)
downloadrockbox-921848119960cd016111d6497db3fae33c120d55.tar.gz
rockbox-921848119960cd016111d6497db3fae33c120d55.zip
Ooops, forgot to check for frame count overflow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3508 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 35f4d3ce96..7d137dfacd 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -1873,6 +1873,11 @@ static void mpeg_thread(void)
if(mpeg_file < 0)
panicf("rec upd: %d", mpeg_file);
+ /* If the number of recorded frames have reached 0x7ffff,
+ we can no longer trust it */
+ if(num_recorded_frames == 0x7ffff)
+ num_recorded_frames = 0;
+
create_xing_header(mpeg_file, 0, num_rec_bytes,
mp3buf, num_recorded_frames, NULL,
false);