projects
/
lms
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
819651c
)
Do just one lseek where possible.
author
barbieri
<barbieri@gmail.com>
Thu, 31 Jan 2008 19:13:04 +0000
(19:13 +0000)
committer
barbieri
<barbieri@gmail.com>
Thu, 31 Jan 2008 19:13:04 +0000
(19:13 +0000)
lightmediascanner/src/plugins/asf/asf.c
patch
|
blob
|
history
diff --git
a/lightmediascanner/src/plugins/asf/asf.c
b/lightmediascanner/src/plugins/asf/asf.c
index
8199269
..
6b06d1f
100644
(file)
--- a/
lightmediascanner/src/plugins/asf/asf.c
+++ b/
lightmediascanner/src/plugins/asf/asf.c
@@
-193,9
+193,7
@@
_parse_content_description(lms_charset_conv_t *cs_conv, int fd, struct asf_info
_read_string(fd, artist_length, &info->artist.str, &info->artist.len);
lms_charset_conv_force(cs_conv, &info->artist.str, &info->artist.len);
/* ignore copyright, comment and rating */
_read_string(fd, artist_length, &info->artist.str, &info->artist.len);
lms_charset_conv_force(cs_conv, &info->artist.str, &info->artist.len);
/* ignore copyright, comment and rating */
- lseek(fd, copyright_length, SEEK_CUR);
- lseek(fd, comment_length, SEEK_CUR);
- lseek(fd, rating_length, SEEK_CUR);
+ lseek(fd, copyright_length + comment_length + rating_length, SEEK_CUR);
}
static void
}
static void
@@
-217,8
+215,7
@@
_parse_attribute_name(int fd,
}
/* metadata & metadata library */
else {
}
/* metadata & metadata library */
else {
- lseek(fd, 2, SEEK_CUR); /* language */
- lseek(fd, 2, SEEK_CUR); /* stream */
+ lseek(fd, 2 + 2, SEEK_CUR); /* language and stream */
attr_name_length = _read_word(fd);
*attr_type = _read_word(fd);
*attr_size = _read_dword(fd);
attr_name_length = _read_word(fd);
*attr_type = _read_word(fd);
*attr_size = _read_dword(fd);