Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f44005b6
Commit
f44005b6
authored
Jan 28, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacenc: only use the number of input samples provided by the user.
Fixes handling of CODEC_CAP_SMALL_LAST_FRAME.
parent
48f1e521
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
aacenc.c
libavcodec/aacenc.c
+5
-3
No files found.
libavcodec/aacenc.c
View file @
f44005b6
...
...
@@ -477,7 +477,7 @@ static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s,
* Channels are reordered from Libav's default order to AAC order.
*/
static
void
deinterleave_input_samples
(
AACEncContext
*
s
,
const
float
*
samples
)
const
float
*
samples
,
int
nb_samples
)
{
int
ch
,
i
;
const
int
sinc
=
s
->
channels
;
...
...
@@ -491,10 +491,12 @@ static void deinterleave_input_samples(AACEncContext *s,
memcpy
(
&
s
->
planar_samples
[
ch
][
1024
],
&
s
->
planar_samples
[
ch
][
2048
],
1024
*
sizeof
(
s
->
planar_samples
[
0
][
0
]));
/* deinterleave */
for
(
i
=
2048
;
i
<
3072
;
i
++
)
{
for
(
i
=
2048
;
i
<
2048
+
nb_samples
;
i
++
)
{
s
->
planar_samples
[
ch
][
i
]
=
*
sptr
;
sptr
+=
sinc
;
}
memset
(
&
s
->
planar_samples
[
ch
][
i
],
0
,
(
3072
-
i
)
*
sizeof
(
s
->
planar_samples
[
0
][
0
]));
}
}
...
...
@@ -512,7 +514,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
return
0
;
if
(
data
)
{
deinterleave_input_samples
(
s
,
data
);
deinterleave_input_samples
(
s
,
data
,
avctx
->
frame_size
);
if
(
s
->
psypp
)
ff_psy_preprocess
(
s
->
psypp
,
s
->
planar_samples
,
s
->
channels
);
}
...
...
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