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
bb5b3940
Commit
bb5b3940
authored
Jan 05, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adpcm: ADPCM Electronic Arts has always two channels
parent
faaec467
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
adpcm.c
libavcodec/adpcm.c
+5
-1
No files found.
libavcodec/adpcm.c
View file @
bb5b3940
...
@@ -91,9 +91,13 @@ typedef struct ADPCMDecodeContext {
...
@@ -91,9 +91,13 @@ typedef struct ADPCMDecodeContext {
static
av_cold
int
adpcm_decode_init
(
AVCodecContext
*
avctx
)
static
av_cold
int
adpcm_decode_init
(
AVCodecContext
*
avctx
)
{
{
ADPCMDecodeContext
*
c
=
avctx
->
priv_data
;
ADPCMDecodeContext
*
c
=
avctx
->
priv_data
;
unsigned
int
min_channels
=
1
;
unsigned
int
max_channels
=
2
;
unsigned
int
max_channels
=
2
;
switch
(
avctx
->
codec
->
id
)
{
switch
(
avctx
->
codec
->
id
)
{
case
CODEC_ID_ADPCM_EA
:
min_channels
=
2
;
break
;
case
CODEC_ID_ADPCM_EA_R1
:
case
CODEC_ID_ADPCM_EA_R1
:
case
CODEC_ID_ADPCM_EA_R2
:
case
CODEC_ID_ADPCM_EA_R2
:
case
CODEC_ID_ADPCM_EA_R3
:
case
CODEC_ID_ADPCM_EA_R3
:
...
@@ -101,7 +105,7 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
...
@@ -101,7 +105,7 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
max_channels
=
6
;
max_channels
=
6
;
break
;
break
;
}
}
if
(
avctx
->
channels
<
=
0
||
avctx
->
channels
>
max_channels
)
{
if
(
avctx
->
channels
<
min_channels
||
avctx
->
channels
>
max_channels
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid number of channels
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid number of channels
\n
"
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
...
...
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