diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/mpeg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 15d531ea1f..35f4d3ce96 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -354,8 +354,6 @@ static void set_elapsed(struct mp3entry* id3) | |||
354 | 354 | ||
355 | static bool paused; /* playback is paused */ | 355 | static bool paused; /* playback is paused */ |
356 | 356 | ||
357 | static unsigned char xingbuf[417]; | ||
358 | |||
359 | #ifdef SIMULATOR | 357 | #ifdef SIMULATOR |
360 | static bool is_playing = false; | 358 | static bool is_playing = false; |
361 | static bool playing = false; | 359 | static bool playing = false; |
@@ -490,6 +488,7 @@ unsigned long record_start_time; /* Value of current_tick when recording | |||
490 | was started */ | 488 | was started */ |
491 | static bool saving; /* We are saving the buffer to disk */ | 489 | static bool saving; /* We are saving the buffer to disk */ |
492 | static char recording_filename[MAX_PATH]; | 490 | static char recording_filename[MAX_PATH]; |
491 | |||
493 | #endif | 492 | #endif |
494 | 493 | ||
495 | static int mpeg_file; | 494 | static int mpeg_file; |
@@ -1869,16 +1868,17 @@ static void mpeg_thread(void) | |||
1869 | if(mpeg_file >= 0) | 1868 | if(mpeg_file >= 0) |
1870 | close(mpeg_file); | 1869 | close(mpeg_file); |
1871 | 1870 | ||
1871 | /* Create the Xing header */ | ||
1872 | mpeg_file = open(recording_filename, O_RDWR); | 1872 | mpeg_file = open(recording_filename, O_RDWR); |
1873 | if(mpeg_file < 0) | 1873 | if(mpeg_file < 0) |
1874 | panicf("rec upd: %d", mpeg_file); | 1874 | panicf("rec upd: %d", mpeg_file); |
1875 | 1875 | ||
1876 | create_xing_header(mpeg_file, 0, num_rec_bytes, | 1876 | create_xing_header(mpeg_file, 0, num_rec_bytes, |
1877 | xingbuf, num_recorded_frames, NULL, | 1877 | mp3buf, num_recorded_frames, NULL, |
1878 | false); | 1878 | false); |
1879 | 1879 | ||
1880 | lseek(mpeg_file, 4096, SEEK_SET); | 1880 | lseek(mpeg_file, 4096, SEEK_SET); |
1881 | write(mpeg_file, xingbuf, 417); | 1881 | write(mpeg_file, mp3buf, 417); |
1882 | close(mpeg_file); | 1882 | close(mpeg_file); |
1883 | 1883 | ||
1884 | mpeg_file = -1; | 1884 | mpeg_file = -1; |