Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b201c167
Commit
b201c167
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/vf_fps: use standard options parsing.
parent
4e2bcec9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
vf_fps.c
libavfilter/vf_fps.c
+3
-8
No files found.
libavfilter/vf_fps.c
View file @
b201c167
...
@@ -74,20 +74,12 @@ AVFILTER_DEFINE_CLASS(fps);
...
@@ -74,20 +74,12 @@ AVFILTER_DEFINE_CLASS(fps);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
{
FPSContext
*
s
=
ctx
->
priv
;
FPSContext
*
s
=
ctx
->
priv
;
const
char
*
shorthand
[]
=
{
"fps"
,
"round"
,
NULL
};
int
ret
;
int
ret
;
s
->
class
=
&
fps_class
;
av_opt_set_defaults
(
s
);
if
((
ret
=
av_opt_set_from_string
(
s
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
if
((
ret
=
av_parse_video_rate
(
&
s
->
framerate
,
s
->
fps
))
<
0
)
{
if
((
ret
=
av_parse_video_rate
(
&
s
->
framerate
,
s
->
fps
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing framerate %s.
\n
"
,
s
->
fps
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing framerate %s.
\n
"
,
s
->
fps
);
return
ret
;
return
ret
;
}
}
av_opt_free
(
s
);
if
(
!
(
s
->
fifo
=
av_fifo_alloc
(
2
*
sizeof
(
AVFrame
*
))))
if
(
!
(
s
->
fifo
=
av_fifo_alloc
(
2
*
sizeof
(
AVFrame
*
))))
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
@@ -288,6 +280,8 @@ static const AVFilterPad avfilter_vf_fps_outputs[] = {
...
@@ -288,6 +280,8 @@ static const AVFilterPad avfilter_vf_fps_outputs[] = {
{
NULL
}
{
NULL
}
};
};
static
const
char
*
const
shorthand
[]
=
{
"fps"
,
"round"
,
NULL
};
AVFilter
avfilter_vf_fps
=
{
AVFilter
avfilter_vf_fps
=
{
.
name
=
"fps"
,
.
name
=
"fps"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Force constant framerate"
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Force constant framerate"
),
...
@@ -300,4 +294,5 @@ AVFilter avfilter_vf_fps = {
...
@@ -300,4 +294,5 @@ AVFilter avfilter_vf_fps = {
.
inputs
=
avfilter_vf_fps_inputs
,
.
inputs
=
avfilter_vf_fps_inputs
,
.
outputs
=
avfilter_vf_fps_outputs
,
.
outputs
=
avfilter_vf_fps_outputs
,
.
priv_class
=
&
fps_class
,
.
priv_class
=
&
fps_class
,
.
shorthand
=
shorthand
,
};
};
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