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
7bbca084
Commit
7bbca084
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added AacBuffer.decoder
We need the decoder object at several places in the AAC plugin. Add it to mp3DecodeData, so we don't have to pass it around in every function.
parent
468f61d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
aac_plugin.c
src/inputPlugins/aac_plugin.c
+7
-4
No files found.
src/inputPlugins/aac_plugin.c
View file @
7bbca084
...
...
@@ -29,6 +29,7 @@
/* all code here is either based on or copied from FAAD2's frontend code */
typedef
struct
{
struct
decoder
*
decoder
;
InputStream
*
inStream
;
size_t
bytesIntoBuffer
;
size_t
bytesConsumed
;
...
...
@@ -176,10 +177,12 @@ static void adtsParse(AacBuffer * b, float *length)
*
length
=
(
float
)
frames
/
framesPerSec
;
}
static
void
initAacBuffer
(
InputStream
*
inStream
,
AacBuffer
*
b
)
static
void
initAacBuffer
(
AacBuffer
*
b
,
struct
decoder
*
decoder
,
InputStream
*
inStream
)
{
memset
(
b
,
0
,
sizeof
(
AacBuffer
));
b
->
decoder
=
decoder
;
b
->
inStream
=
inStream
;
b
->
buffer
=
xmalloc
(
FAAD_MIN_STREAMSIZE
*
AAC_MAX_CHANNELS
);
...
...
@@ -259,7 +262,7 @@ static float getAacFloatTotalTime(char *file)
if
(
openInputStream
(
&
inStream
,
file
)
<
0
)
return
-
1
;
initAacBuffer
(
&
inStream
,
&
b
);
initAacBuffer
(
&
b
,
NULL
,
&
inStream
);
aac_parse_header
(
&
b
,
&
length
);
if
(
length
<
0
)
{
...
...
@@ -319,7 +322,7 @@ static int aac_stream_decode(struct decoder * mpd_decoder,
AacBuffer
b
;
int
initialized
=
0
;
initAacBuffer
(
inStream
,
&
b
);
initAacBuffer
(
&
b
,
mpd_decoder
,
inStream
);
decoder
=
faacDecOpen
();
...
...
@@ -463,7 +466,7 @@ static int aac_decode(struct decoder * mpd_decoder, char *path)
if
(
openInputStream
(
&
inStream
,
path
)
<
0
)
return
-
1
;
initAacBuffer
(
&
inStream
,
&
b
);
initAacBuffer
(
&
b
,
mpd_decoder
,
&
inStream
);
aac_parse_header
(
&
b
,
NULL
);
decoder
=
faacDecOpen
();
...
...
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