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
e94447cd
Commit
e94447cd
authored
May 04, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_amultiply: use pts from frame from first input
parent
3d8e99eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
af_amultiply.c
libavfilter/af_amultiply.c
+5
-7
No files found.
libavfilter/af_amultiply.c
View file @
e94447cd
...
...
@@ -34,7 +34,6 @@ typedef struct AudioMultiplyContext {
const
AVClass
*
class
;
AVFrame
*
frames
[
2
];
int64_t
pts
;
int
planes
;
int
channels
;
int
samples_align
;
...
...
@@ -95,21 +94,20 @@ static int activate(AVFilterContext *ctx)
}
}
if
(
nb_samples
>
0
&&
s
->
frames
[
0
]
&&
s
->
frames
[
1
])
{
if
(
s
->
frames
[
0
]
&&
s
->
frames
[
1
])
{
AVFrame
*
out
;
int
plane_samples
;
if
(
av_sample_fmt_is_planar
(
ctx
->
inputs
[
0
]
->
format
))
plane_samples
=
FFALIGN
(
nb_samples
,
s
->
samples_align
);
plane_samples
=
FFALIGN
(
s
->
frames
[
0
]
->
nb_samples
,
s
->
samples_align
);
else
plane_samples
=
FFALIGN
(
nb_samples
*
s
->
channels
,
s
->
samples_align
);
plane_samples
=
FFALIGN
(
s
->
frames
[
0
]
->
nb_samples
*
s
->
channels
,
s
->
samples_align
);
out
=
ff_get_audio_buffer
(
ctx
->
outputs
[
0
],
nb_samples
);
out
=
ff_get_audio_buffer
(
ctx
->
outputs
[
0
],
s
->
frames
[
0
]
->
nb_samples
);
if
(
!
out
)
return
AVERROR
(
ENOMEM
);
out
->
pts
=
s
->
pts
;
s
->
pts
+=
nb_samples
;
out
->
pts
=
s
->
frames
[
0
]
->
pts
;
if
(
av_get_packed_sample_fmt
(
ctx
->
inputs
[
0
]
->
format
)
==
AV_SAMPLE_FMT_FLT
)
{
for
(
i
=
0
;
i
<
s
->
planes
;
i
++
)
{
...
...
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