mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
snd_mp3.c: return type tweak for mp3_tagsize()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1235 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
271f05bf63
commit
56d1ab5f7a
1 changed files with 5 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
||||||
* functions were adapted from the GPL-licensed libid3tag library, see at
|
* functions were adapted from the GPL-licensed libid3tag library, see at
|
||||||
* http://www.underbit.com/products/mad/. Adapted to Quake and Hexen II
|
* http://www.underbit.com/products/mad/. Adapted to Quake and Hexen II
|
||||||
* game engines by O.Sezer :
|
* game engines by O.Sezer :
|
||||||
* Copyright (C) 2010-2013 O.Sezer <sezero@users.sourceforge.net>
|
* Copyright (C) 2010-2015 O.Sezer <sezero@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -89,16 +89,16 @@ static inline qboolean tag_is_id3v2(const unsigned char *data, size_t length)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mp3_tagsize(const unsigned char *data, size_t length)
|
static size_t mp3_tagsize(const unsigned char *data, size_t length)
|
||||||
{
|
{
|
||||||
|
size_t size;
|
||||||
|
|
||||||
if (tag_is_id3v1(data, length))
|
if (tag_is_id3v1(data, length))
|
||||||
return 128;
|
return 128;
|
||||||
|
|
||||||
if (tag_is_id3v2(data, length))
|
if (tag_is_id3v2(data, length))
|
||||||
{
|
{
|
||||||
unsigned char flags;
|
unsigned char flags = data[5];
|
||||||
unsigned int size;
|
|
||||||
flags = data[5];
|
|
||||||
size = 10 + (data[6]<<21) + (data[7]<<14) + (data[8]<<7) + data[9];
|
size = 10 + (data[6]<<21) + (data[7]<<14) + (data[8]<<7) + data[9];
|
||||||
if (flags & ID3_TAG_FLAG_FOOTERPRESENT)
|
if (flags & ID3_TAG_FLAG_FOOTERPRESENT)
|
||||||
size += 10;
|
size += 10;
|
||||||
|
|
Loading…
Reference in a new issue