From 921848119960cd016111d6497db3fae33c120d55 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 1 Apr 2003 21:58:50 +0000 Subject: Ooops, forgot to check for frame count overflow git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3508 a1c6a512-1295-4272-9138-f99709370657 --- firmware/mpeg.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware') 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); -- cgit v1.2.3