Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
dcd92aa0
Commit
dcd92aa0
authored
Sep 08, 2023
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hcadec: do not hardcode max number of channels
parent
a234e5cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
hcadec.c
libavcodec/hcadec.c
+4
-2
No files found.
libavcodec/hcadec.c
View file @
dcd92aa0
...
...
@@ -28,6 +28,8 @@
#include "get_bits.h"
#include "hca_data.h"
#define MAX_CHANNELS 16
typedef
struct
ChannelContext
{
float
base
[
128
];
DECLARE_ALIGNED
(
32
,
float
,
imdct_in
)[
128
];
...
...
@@ -44,7 +46,7 @@ typedef struct ChannelContext {
typedef
struct
HCAContext
{
const
AVCRC
*
crc_table
;
ChannelContext
ch
[
16
];
ChannelContext
ch
[
MAX_CHANNELS
];
uint8_t
ath
[
128
];
...
...
@@ -249,7 +251,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_FLTP
;
c
->
crc_table
=
av_crc_get_table
(
AV_CRC_16_ANSI
);
if
(
avctx
->
ch_layout
.
nb_channels
<=
0
||
avctx
->
ch_layout
.
nb_channels
>
16
)
if
(
avctx
->
ch_layout
.
nb_channels
<=
0
||
avctx
->
ch_layout
.
nb_channels
>
FF_ARRAY_ELEMS
(
c
->
ch
)
)
return
AVERROR
(
EINVAL
);
c
->
fdsp
=
avpriv_float_dsp_alloc
(
avctx
->
flags
&
AV_CODEC_FLAG_BITEXACT
);
...
...
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