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
f6765c4d
Commit
f6765c4d
authored
Nov 12, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aac: removed attribute "atEof"
Use input_stream_eof() instead.
parent
eff21067
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
aac_plugin.c
src/decoder/aac_plugin.c
+7
-14
No files found.
src/decoder/aac_plugin.c
View file @
f6765c4d
...
...
@@ -34,7 +34,6 @@ typedef struct {
size_t
bytesConsumed
;
off_t
fileOffset
;
unsigned
char
*
buffer
;
bool
atEof
;
}
AacBuffer
;
static
void
aac_buffer_shift
(
AacBuffer
*
b
,
size_t
length
)
...
...
@@ -52,7 +51,7 @@ static void aac_buffer_shift(AacBuffer * b, size_t length)
static
void
fillAacBuffer
(
AacBuffer
*
b
)
{
size_t
bread
;
size_t
rest
,
bread
;
if
(
b
->
bytesIntoBuffer
>=
FAAD_MIN_STREAMSIZE
*
AAC_MAX_CHANNELS
)
/* buffer already full */
...
...
@@ -60,17 +59,11 @@ static void fillAacBuffer(AacBuffer * b)
aac_buffer_shift
(
b
,
b
->
bytesConsumed
);
if
(
!
b
->
atEof
)
{
size_t
rest
=
FAAD_MIN_STREAMSIZE
*
AAC_MAX_CHANNELS
-
b
->
bytesIntoBuffer
;
bread
=
decoder_read
(
b
->
decoder
,
b
->
inStream
,
(
void
*
)(
b
->
buffer
+
b
->
bytesIntoBuffer
),
rest
);
if
(
bread
==
0
&&
input_stream_eof
(
b
->
inStream
))
b
->
atEof
=
true
;
b
->
bytesIntoBuffer
+=
bread
;
}
rest
=
FAAD_MIN_STREAMSIZE
*
AAC_MAX_CHANNELS
-
b
->
bytesIntoBuffer
;
bread
=
decoder_read
(
b
->
decoder
,
b
->
inStream
,
(
void
*
)(
b
->
buffer
+
b
->
bytesIntoBuffer
),
rest
);
b
->
bytesIntoBuffer
+=
bread
;
if
((
b
->
bytesIntoBuffer
>
3
&&
memcmp
(
b
->
buffer
,
"TAG"
,
3
)
==
0
)
||
(
b
->
bytesIntoBuffer
>
11
&&
...
...
@@ -335,7 +328,7 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
faacDecSetConfiguration
(
decoder
,
config
);
while
(
b
.
bytesIntoBuffer
<
FAAD_MIN_STREAMSIZE
*
AAC_MAX_CHANNELS
&&
!
b
.
atEof
&&
!
input_stream_eof
(
b
.
inStream
)
&&
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_NONE
)
{
fillAacBuffer
(
&
b
);
adts_find_frame
(
&
b
);
...
...
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