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
55740299
Commit
55740299
authored
Mar 15, 2022
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_sofalizer: fix getting speaker position
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
f0be7c10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
af_sofalizer.c
libavfilter/af_sofalizer.c
+6
-6
No files found.
libavfilter/af_sofalizer.c
View file @
55740299
...
...
@@ -252,7 +252,7 @@ static int get_speaker_pos(AVFilterContext *ctx,
AVChannelLayout
*
channel_layout
=
&
ctx
->
inputs
[
0
]
->
ch_layout
;
float
azim
[
64
]
=
{
0
};
float
elev
[
64
]
=
{
0
};
int
m
,
ch
,
n_conv
=
ctx
->
inputs
[
0
]
->
ch_layout
.
nb_channels
;
/* get no. input channels */
int
ch
,
n_conv
=
ctx
->
inputs
[
0
]
->
ch_layout
.
nb_channels
;
/* get no. input channels */
if
(
n_conv
<
0
||
n_conv
>
64
)
return
AVERROR
(
EINVAL
);
...
...
@@ -263,8 +263,8 @@ static int get_speaker_pos(AVFilterContext *ctx,
parse_speaker_pos
(
ctx
);
/* set speaker positions according to input channel configuration: */
for
(
m
=
0
,
ch
=
0
;
ch
<
n_conv
&&
m
<
64
;
m
++
)
{
int
chan
=
av_channel_layout_channel_from_index
(
channel_layout
,
m
);
for
(
ch
=
0
;
ch
<
n_conv
;
ch
++
)
{
int
chan
=
av_channel_layout_channel_from_index
(
channel_layout
,
ch
);
switch
(
chan
)
{
case
AV_CHAN_FRONT_LEFT
:
azim
[
ch
]
=
30
;
break
;
...
...
@@ -303,9 +303,9 @@ static int get_speaker_pos(AVFilterContext *ctx,
return
AVERROR
(
EINVAL
);
}
if
(
s
->
vspkrpos
[
m
].
set
)
{
azim
[
ch
]
=
s
->
vspkrpos
[
m
].
azim
;
elev
[
ch
]
=
s
->
vspkrpos
[
m
].
elev
;
if
(
s
->
vspkrpos
[
ch
].
set
)
{
azim
[
ch
]
=
s
->
vspkrpos
[
ch
].
azim
;
elev
[
ch
]
=
s
->
vspkrpos
[
ch
].
elev
;
}
}
...
...
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