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
0cf35059
Commit
0cf35059
authored
Dec 16, 2012
by
Hendrik Leppkes
Committed by
Justin Ruggles
Dec 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avresample: use valid log context in mixing functions
Signed-off-by:
Justin Ruggles
<
justin.ruggles@gmail.com
>
parent
f1c2915c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
audio_mix.c
libavresample/audio_mix.c
+5
-5
No files found.
libavresample/audio_mix.c
View file @
0cf35059
...
@@ -467,13 +467,13 @@ int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride)
...
@@ -467,13 +467,13 @@ int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride)
if
(
am
->
in_channels
<=
0
||
am
->
in_channels
>
AVRESAMPLE_MAX_CHANNELS
||
if
(
am
->
in_channels
<=
0
||
am
->
in_channels
>
AVRESAMPLE_MAX_CHANNELS
||
am
->
out_channels
<=
0
||
am
->
out_channels
>
AVRESAMPLE_MAX_CHANNELS
)
{
am
->
out_channels
<=
0
||
am
->
out_channels
>
AVRESAMPLE_MAX_CHANNELS
)
{
av_log
(
am
,
AV_LOG_ERROR
,
"Invalid channel counts
\n
"
);
av_log
(
am
->
avr
,
AV_LOG_ERROR
,
"Invalid channel counts
\n
"
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
#define GET_MATRIX_CONVERT(suffix, scale) \
#define GET_MATRIX_CONVERT(suffix, scale) \
if (!am->matrix_ ## suffix[0]) { \
if (!am->matrix_ ## suffix[0]) { \
av_log(am
, AV_LOG_ERROR, "matrix is not set\n");
\
av_log(am
->avr, AV_LOG_ERROR, "matrix is not set\n");
\
return AVERROR(EINVAL); \
return AVERROR(EINVAL); \
} \
} \
for (o = 0; o < am->out_channels; o++) \
for (o = 0; o < am->out_channels; o++) \
...
@@ -491,7 +491,7 @@ int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride)
...
@@ -491,7 +491,7 @@ int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride)
GET_MATRIX_CONVERT
(
flt
,
1
.
0
);
GET_MATRIX_CONVERT
(
flt
,
1
.
0
);
break
;
break
;
default
:
default
:
av_log
(
am
,
AV_LOG_ERROR
,
"Invalid mix coeff type
\n
"
);
av_log
(
am
->
avr
,
AV_LOG_ERROR
,
"Invalid mix coeff type
\n
"
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
...
@@ -504,7 +504,7 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
...
@@ -504,7 +504,7 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
if
(
am
->
in_channels
<=
0
||
am
->
in_channels
>
AVRESAMPLE_MAX_CHANNELS
||
if
(
am
->
in_channels
<=
0
||
am
->
in_channels
>
AVRESAMPLE_MAX_CHANNELS
||
am
->
out_channels
<=
0
||
am
->
out_channels
>
AVRESAMPLE_MAX_CHANNELS
)
{
am
->
out_channels
<=
0
||
am
->
out_channels
>
AVRESAMPLE_MAX_CHANNELS
)
{
av_log
(
am
,
AV_LOG_ERROR
,
"Invalid channel counts
\n
"
);
av_log
(
am
->
avr
,
AV_LOG_ERROR
,
"Invalid channel counts
\n
"
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
...
@@ -540,7 +540,7 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
...
@@ -540,7 +540,7 @@ int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride)
CONVERT_MATRIX
(
flt
,
v
)
CONVERT_MATRIX
(
flt
,
v
)
break
;
break
;
default
:
default
:
av_log
(
am
,
AV_LOG_ERROR
,
"Invalid mix coeff type
\n
"
);
av_log
(
am
->
avr
,
AV_LOG_ERROR
,
"Invalid mix coeff type
\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