forked from len0rd/rockbox
Add an error check in get_mp3_metadata()
Check whether getonglength() succeeded or not, to prevent get_mp3_metadata() from returning a success value when in fact it failed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14327 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6a92e475ac
commit
db15e5d3ba
1 changed files with 4 additions and 1 deletions
|
|
@ -1132,7 +1132,10 @@ bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename, bool
|
|||
|
||||
if (!v1found && entry->id3v2len)
|
||||
setid3v2title(fd, entry);
|
||||
entry->length = getsonglength(fd, entry);
|
||||
int len = getsonglength(fd, entry);
|
||||
if (len < 0)
|
||||
return false;
|
||||
entry->length = len;
|
||||
|
||||
/* Subtract the meta information from the file size to get
|
||||
the true size of the MP3 stream */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue