diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-12-28 03:40:41 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-12-28 03:40:41 +0000 |
commit | fb5f458c275c442d7e1f4d531127ff5ff765e62a (patch) | |
tree | 7a6211b8ccb13e336961275cc924636a09604324 /firmware/mp3data.c | |
parent | a9875a96d2c04a025396ac0f7aa0068cba00c9ee (diff) |
Internal code cleanup - the header template is not taken from the stream if a template header is passed to create_xing_header()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4180 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mp3data.c')
-rw-r--r-- | firmware/mp3data.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/mp3data.c b/firmware/mp3data.c index 83d916ff9f..896ecda7f0 100644 --- a/firmware/mp3data.c +++ b/firmware/mp3data.c @@ -634,13 +634,11 @@ int create_xing_header(int fd, int startpos, int filesize, filepos += info.frame_size; } - /* Save a header for later use. Yes, we may be passed a header - template in the header_template argument, but since we are - reading headers from the stream anyway, we might as well - use the ones we find. However, we only save one header, and - we want to save one in te middle of the stream, just in case - the first and the last headers are corrupt. */ - if(i == 1) + /* Save a header for later use if header_template is empty. + We only save one header, and we want to save one in the + middle of the stream, just in case the first and the last + headers are corrupt. */ + if(!header_template && i == 1) header_template = header; if(progressfunc) |