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
78b6887d
Commit
78b6887d
authored
Mar 31, 2018
by
Martin Vignali
Committed by
Paul B Mahol
Apr 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/showvolume : indent after prev commit and add comment
parent
e4cfb2c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
avf_showvolume.c
libavfilter/avf_showvolume.c
+7
-6
No files found.
libavfilter/avf_showvolume.c
View file @
78b6887d
...
...
@@ -358,15 +358,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
return
AVERROR
(
ENOMEM
);
av_frame_make_writable
(
out
);
/* draw volume level */
for
(
c
=
0
;
c
<
inlink
->
channels
&&
s
->
h
>=
8
&&
s
->
draw_volume
;
c
++
)
{
char
buf
[
16
];
if
(
s
->
orientation
)
{
snprintf
(
buf
,
sizeof
(
buf
),
"%.2f"
,
s
->
values
[
c
*
VAR_VARS_NB
+
VAR_VOLUME
]);
drawtext
(
out
,
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
8
)
/
2
,
2
,
buf
,
1
);
}
else
{
snprintf
(
buf
,
sizeof
(
buf
),
"%.2f"
,
s
->
values
[
c
*
VAR_VARS_NB
+
VAR_VOLUME
]);
drawtext
(
out
,
FFMAX
(
0
,
s
->
w
-
8
*
(
int
)
strlen
(
buf
)),
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
8
)
/
2
,
buf
,
0
);
if
(
s
->
orientation
)
{
/* vertical */
snprintf
(
buf
,
sizeof
(
buf
),
"%.2f"
,
s
->
values
[
c
*
VAR_VARS_NB
+
VAR_VOLUME
]);
drawtext
(
out
,
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
8
)
/
2
,
2
,
buf
,
1
);
}
else
{
/* horizontal */
snprintf
(
buf
,
sizeof
(
buf
),
"%.2f"
,
s
->
values
[
c
*
VAR_VARS_NB
+
VAR_VOLUME
]);
drawtext
(
out
,
FFMAX
(
0
,
s
->
w
-
8
*
(
int
)
strlen
(
buf
)),
c
*
(
s
->
h
+
s
->
b
)
+
(
s
->
h
-
8
)
/
2
,
buf
,
0
);
}
}
...
...
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