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
c0771a1a
Commit
c0771a1a
authored
Apr 14, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_channelmap: cosmetics, use an extra local variable to shorten the code
parent
aafed117
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
af_channelmap.c
libavfilter/af_channelmap.c
+8
-7
No files found.
libavfilter/af_channelmap.c
View file @
c0771a1a
...
...
@@ -362,24 +362,25 @@ static int channelmap_config_input(AVFilterLink *inlink)
char
layout_name
[
256
];
for
(
i
=
0
;
i
<
s
->
nch
;
i
++
)
{
struct
ChannelMap
*
m
=
&
s
->
map
[
i
];
if
(
s
->
mode
==
MAP_PAIR_STR_INT
||
s
->
mode
==
MAP_PAIR_STR_STR
)
{
s
->
map
[
i
].
in_channel_idx
=
av_get_channel_layout_channel_index
(
inlink
->
channel_layout
,
s
->
map
[
i
].
in_channel
);
m
->
in_channel_idx
=
av_get_channel_layout_channel_index
(
inlink
->
channel_layout
,
m
->
in_channel
);
}
if
(
s
->
map
[
i
].
in_channel_idx
<
0
||
s
->
map
[
i
].
in_channel_idx
>=
nb_channels
)
{
if
(
m
->
in_channel_idx
<
0
||
m
->
in_channel_idx
>=
nb_channels
)
{
av_get_channel_layout_string
(
layout_name
,
sizeof
(
layout_name
),
0
,
inlink
->
channel_layout
);
if
(
s
->
map
[
i
].
in_channel
)
{
channel_name
=
av_get_channel_name
(
s
->
map
[
i
].
in_channel
);
if
(
m
->
in_channel
)
{
channel_name
=
av_get_channel_name
(
m
->
in_channel
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"input channel '%s' not available from input layout '%s'
\n
"
,
channel_name
,
layout_name
);
}
else
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"input channel #%d not available from input layout '%s'
\n
"
,
s
->
map
[
i
].
in_channel_idx
,
layout_name
);
m
->
in_channel_idx
,
layout_name
);
}
err
=
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