summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-12-28 03:40:41 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-12-28 03:40:41 +0000
commitfb5f458c275c442d7e1f4d531127ff5ff765e62a (patch)
tree7a6211b8ccb13e336961275cc924636a09604324
parenta9875a96d2c04a025396ac0f7aa0068cba00c9ee (diff)
downloadrockbox-fb5f458c275c442d7e1f4d531127ff5ff765e62a.zip
rockbox-fb5f458c275c442d7e1f4d531127ff5ff765e62a.tar.gz
rockbox-fb5f458c275c442d7e1f4d531127ff5ff765e62a.tar.bz2
rockbox-fb5f458c275c442d7e1f4d531127ff5ff765e62a.tar.xz
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
-rw-r--r--firmware/mp3data.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index 83d916f..896ecda 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)