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
940be965
Commit
940be965
authored
May 11, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dcaenc: fix out of array read
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8616c446
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
dcaenc.c
libavcodec/dcaenc.c
+5
-5
No files found.
libavcodec/dcaenc.c
View file @
940be965
...
...
@@ -503,13 +503,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
samples
=
(
const
int16_t
*
)
frame
->
data
[
0
];
for
(
i
=
0
;
i
<
PCM_SAMPLES
;
i
++
)
{
/* i is the decimated sample number */
for
(
channel
=
0
;
channel
<
c
->
prim_channels
+
1
;
channel
++
)
{
real_channel
=
c
->
channel_order_tab
[
channel
];
if
(
real_channel
>=
0
)
{
/* Get 32 PCM samples */
for
(
k
=
0
;
k
<
32
;
k
++
)
{
/* k is the sample number in a 32-sample block */
c
->
pcm
[
k
]
=
samples
[
avctx
->
channels
*
(
32
*
i
+
k
)
+
channel
]
<<
16
;
}
/* Put subband samples into the proper place */
real_channel
=
c
->
channel_order_tab
[
channel
];
if
(
real_channel
>=
0
)
{
qmf_decompose
(
c
,
c
->
pcm
,
&
c
->
subband
[
i
][
real_channel
][
0
],
real_channel
);
}
}
...
...
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