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
6e45acd2
Commit
6e45acd2
authored
Apr 10, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: let single output frame A->V filters set reasonable frame rate
parent
7ac559b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+2
-0
avf_showwaves.c
libavfilter/avf_showwaves.c
+5
-2
No files found.
libavfilter/avf_showspectrum.c
View file @
6e45acd2
...
...
@@ -1241,6 +1241,8 @@ static int config_output(AVFilterLink *outlink)
int
ret
=
av_parse_video_rate
(
&
s
->
frame_rate
,
s
->
rate_str
);
if
(
ret
<
0
)
return
ret
;
}
else
if
(
s
->
single_pic
)
{
s
->
frame_rate
=
av_make_q
(
1
,
1
);
}
else
{
s
->
frame_rate
=
s
->
auto_frame_rate
;
}
...
...
libavfilter/avf_showwaves.c
View file @
6e45acd2
...
...
@@ -437,8 +437,11 @@ static int config_output(AVFilterLink *outlink)
outlink
->
h
=
showwaves
->
h
;
outlink
->
sample_aspect_ratio
=
(
AVRational
){
1
,
1
};
outlink
->
frame_rate
=
av_div_q
((
AVRational
){
inlink
->
sample_rate
,
showwaves
->
n
},
(
AVRational
){
showwaves
->
w
,
1
});
if
(
showwaves
->
single_pic
)
outlink
->
frame_rate
=
av_make_q
(
1
,
1
);
else
outlink
->
frame_rate
=
av_div_q
((
AVRational
){
inlink
->
sample_rate
,
showwaves
->
n
},
(
AVRational
){
showwaves
->
w
,
1
});
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"s:%dx%d r:%f n:%d
\n
"
,
showwaves
->
w
,
showwaves
->
h
,
av_q2d
(
outlink
->
frame_rate
),
showwaves
->
n
);
...
...
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