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
55e0b041
Commit
55e0b041
authored
Apr 29, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_mix: output same number of frames from input for tmix
parent
1148e5f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
vf_mix.c
libavfilter/vf_mix.c
+7
-3
No files found.
libavfilter/vf_mix.c
View file @
55e0b041
...
@@ -415,8 +415,12 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -415,8 +415,12 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
if
(
s
->
nb_frames
<
s
->
nb_inputs
)
{
if
(
s
->
nb_frames
<
s
->
nb_inputs
)
{
s
->
frames
[
s
->
nb_frames
]
=
in
;
s
->
frames
[
s
->
nb_frames
]
=
in
;
s
->
nb_frames
++
;
s
->
nb_frames
++
;
if
(
s
->
nb_frames
<
s
->
nb_inputs
)
while
(
s
->
nb_frames
<
s
->
nb_inputs
)
{
return
0
;
s
->
frames
[
s
->
nb_frames
]
=
av_frame_clone
(
s
->
frames
[
s
->
nb_frames
-
1
]);
if
(
!
s
->
frames
[
s
->
nb_frames
])
return
AVERROR
(
ENOMEM
);
s
->
nb_frames
++
;
}
}
else
{
}
else
{
av_frame_free
(
&
s
->
frames
[
0
]);
av_frame_free
(
&
s
->
frames
[
0
]);
memmove
(
&
s
->
frames
[
0
],
&
s
->
frames
[
1
],
sizeof
(
*
s
->
frames
)
*
(
s
->
nb_inputs
-
1
));
memmove
(
&
s
->
frames
[
0
],
&
s
->
frames
[
1
],
sizeof
(
*
s
->
frames
)
*
(
s
->
nb_inputs
-
1
));
...
@@ -433,7 +437,7 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -433,7 +437,7 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
if
(
!
out
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
out
->
pts
=
s
->
frames
[
0
]
->
pts
;
out
->
pts
=
s
->
frames
[
s
->
nb_frames
-
1
]
->
pts
;
td
.
out
=
out
;
td
.
out
=
out
;
td
.
in
=
s
->
frames
;
td
.
in
=
s
->
frames
;
...
...
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