Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b30ec730
Commit
b30ec730
authored
Nov 12, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aac: use unsigned integers and size_t where appropriate
parent
9806355d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
aac_plugin.c
src/decoder/aac_plugin.c
+6
-5
No files found.
src/decoder/aac_plugin.c
View file @
b30ec730
...
...
@@ -79,7 +79,7 @@ static void advanceAacBuffer(AacBuffer * b, size_t bytes)
b
->
bytesIntoBuffer
-=
bytes
;
}
static
int
adtsSampleRates
[]
=
static
const
unsigned
adtsSampleRates
[]
=
{
96000
,
88200
,
64000
,
48000
,
44100
,
32000
,
24000
,
22050
,
16000
,
12000
,
11025
,
8000
,
7350
,
0
,
0
,
0
};
...
...
@@ -139,7 +139,7 @@ static size_t adts_find_frame(AacBuffer * b)
static
void
adtsParse
(
AacBuffer
*
b
,
float
*
length
)
{
unsigned
int
frames
,
frameLength
;
int
sample_rate
=
0
;
unsigned
sample_rate
=
0
;
float
framesPerSec
;
/* Read all frames to ensure correct time and bitrate */
...
...
@@ -163,7 +163,7 @@ static void adtsParse(AacBuffer * b, float *length)
}
framesPerSec
=
(
float
)
sample_rate
/
1024
.
0
;
if
(
framesPerSec
!=
0
)
if
(
framesPerSec
>
0
)
*
length
=
(
float
)
frames
/
framesPerSec
;
}
...
...
@@ -217,8 +217,9 @@ static void aac_parse_header(AacBuffer * b, float *length)
fillAacBuffer
(
b
);
}
else
if
(
memcmp
(
b
->
buffer
,
"ADIF"
,
4
)
==
0
)
{
int
bitRate
;
int
skipSize
=
(
b
->
buffer
[
4
]
&
0x80
)
?
9
:
0
;
unsigned
bitRate
;
size_t
skipSize
=
(
b
->
buffer
[
4
]
&
0x80
)
?
9
:
0
;
bitRate
=
((
unsigned
int
)(
b
->
buffer
[
4
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment