aac: use size_t
This commit is contained in:
parent
a6332fd13b
commit
0ca8f9ac49
@ -30,9 +30,9 @@
|
|||||||
/* all code here is either based on or copied from FAAD2's frontend code */
|
/* all code here is either based on or copied from FAAD2's frontend code */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
InputStream *inStream;
|
InputStream *inStream;
|
||||||
long bytesIntoBuffer;
|
size_t bytesIntoBuffer;
|
||||||
long bytesConsumed;
|
size_t bytesConsumed;
|
||||||
long fileOffset;
|
off_t fileOffset;
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
int atEof;
|
int atEof;
|
||||||
} AacBuffer;
|
} AacBuffer;
|
||||||
@ -40,7 +40,7 @@ typedef struct {
|
|||||||
static void fillAacBuffer(AacBuffer * b)
|
static void fillAacBuffer(AacBuffer * b)
|
||||||
{
|
{
|
||||||
if (b->bytesConsumed > 0) {
|
if (b->bytesConsumed > 0) {
|
||||||
int bread;
|
size_t bread;
|
||||||
|
|
||||||
if (b->bytesIntoBuffer) {
|
if (b->bytesIntoBuffer) {
|
||||||
memmove((void *)b->buffer, (void *)(b->buffer +
|
memmove((void *)b->buffer, (void *)(b->buffer +
|
||||||
@ -78,7 +78,7 @@ static void fillAacBuffer(AacBuffer * b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void advanceAacBuffer(AacBuffer * b, int bytes)
|
static void advanceAacBuffer(AacBuffer * b, size_t bytes)
|
||||||
{
|
{
|
||||||
b->fileOffset += bytes;
|
b->fileOffset += bytes;
|
||||||
b->bytesConsumed = bytes;
|
b->bytesConsumed = bytes;
|
||||||
@ -92,7 +92,7 @@ static int adtsSampleRates[] =
|
|||||||
|
|
||||||
static int adtsParse(AacBuffer * b, float *length)
|
static int adtsParse(AacBuffer * b, float *length)
|
||||||
{
|
{
|
||||||
int frames, frameLength;
|
unsigned int frames, frameLength;
|
||||||
int sampleRate = 0;
|
int sampleRate = 0;
|
||||||
float framesPerSec;
|
float framesPerSec;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user