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
0e66dcd7
Commit
0e66dcd7
authored
Sep 05, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_volumedetect: Remove dependency on channel layout
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
6d50dff8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
af_volumedetect.c
libavfilter/af_volumedetect.c
+11
-2
No files found.
libavfilter/af_volumedetect.c
View file @
0e66dcd7
...
...
@@ -41,9 +41,19 @@ static int query_formats(AVFilterContext *ctx)
AV_SAMPLE_FMT_NONE
};
AVFilterFormats
*
formats
;
AVFilterChannelLayouts
*
layouts
;
int
ret
;
if
(
!
(
formats
=
ff_make_format_list
(
sample_fmts
)))
return
AVERROR
(
ENOMEM
);
layouts
=
ff_all_channel_counts
();
if
(
!
layouts
)
return
AVERROR
(
ENOMEM
);
ret
=
ff_set_common_channel_layouts
(
ctx
,
layouts
);
if
(
ret
<
0
)
return
ret
;
return
ff_set_common_formats
(
ctx
,
formats
);
}
...
...
@@ -51,9 +61,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *samples)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
VolDetectContext
*
vd
=
ctx
->
priv
;
int64_t
layout
=
samples
->
channel_layout
;
int
nb_samples
=
samples
->
nb_samples
;
int
nb_channels
=
av_
get_channel_layout_nb_channels
(
layout
);
int
nb_channels
=
av_
frame_get_channels
(
samples
);
int
nb_planes
=
nb_channels
;
int
plane
,
i
;
int16_t
*
pcm
;
...
...
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