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
39c2880e
Commit
39c2880e
authored
Feb 19, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_volume: preserve frame properties
parent
dcc7e4bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
af_volume.c
libavfilter/af_volume.c
+7
-1
No files found.
libavfilter/af_volume.c
View file @
39c2880e
...
...
@@ -229,6 +229,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
int
nb_samples
=
buf
->
nb_samples
;
AVFrame
*
out_buf
;
int
ret
;
if
(
vol
->
volume
==
1
.
0
||
vol
->
volume_i
==
256
)
return
ff_filter_frame
(
outlink
,
buf
);
...
...
@@ -240,7 +241,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
out_buf
=
ff_get_audio_buffer
(
inlink
,
nb_samples
);
if
(
!
out_buf
)
return
AVERROR
(
ENOMEM
);
out_buf
->
pts
=
buf
->
pts
;
ret
=
av_frame_copy_props
(
out_buf
,
buf
);
if
(
ret
<
0
)
{
av_frame_free
(
&
out_buf
);
av_frame_free
(
&
buf
);
return
ret
;
}
}
if
(
vol
->
precision
!=
PRECISION_FIXED
||
vol
->
volume_i
>
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