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
981128c2
Commit
981128c2
authored
Nov 10, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/fade: remove a bunch of useless parenthesis.
parent
461e810c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
vf_fade.c
libavfilter/vf_fade.c
+8
-8
No files found.
libavfilter/vf_fade.c
View file @
981128c2
...
...
@@ -276,18 +276,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
// Calculate Fade assuming this is a Fade In
if
(
s
->
fade_state
==
VF_FADE_WAITING
)
{
s
->
factor
=
0
;
if
(
(
frame_timestamp
>=
(
s
->
start_time
/
(
double
)
AV_TIME_BASE
))
&&
(
inlink
->
frame_count
>=
s
->
start_frame
)
)
{
if
(
frame_timestamp
>=
s
->
start_time
/
(
double
)
AV_TIME_BASE
&&
inlink
->
frame_count
>=
s
->
start_frame
)
{
// Time to start fading
s
->
fade_state
=
VF_FADE_FADING
;
// Save start time in case we are starting based on frames and fading based on time
if
(
(
s
->
start_time
==
0
)
&&
(
s
->
start_frame
!=
0
)
)
{
if
(
s
->
start_time
==
0
&&
s
->
start_frame
!=
0
)
{
s
->
start_time
=
frame_timestamp
*
(
double
)
AV_TIME_BASE
;
}
// Save start frame in case we are starting based on time and fading based on frames
if
(
(
s
->
start_time
!=
0
)
&&
(
s
->
start_frame
==
0
)
)
{
if
(
s
->
start_time
!=
0
&&
s
->
start_frame
==
0
)
{
s
->
start_frame
=
inlink
->
frame_count
;
}
}
...
...
@@ -296,16 +296,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
if
(
s
->
duration
==
0
)
{
// Fading based on frame count
s
->
factor
=
(
inlink
->
frame_count
-
s
->
start_frame
)
*
s
->
fade_per_frame
;
if
(
inlink
->
frame_count
>
(
s
->
start_frame
+
s
->
nb_frames
)
)
{
if
(
inlink
->
frame_count
>
s
->
start_frame
+
s
->
nb_frames
)
{
s
->
fade_state
=
VF_FADE_DONE
;
}
}
else
{
// Fading based on duration
s
->
factor
=
(
frame_timestamp
-
(
s
->
start_time
/
(
double
)
AV_TIME_BASE
)
)
s
->
factor
=
(
frame_timestamp
-
s
->
start_time
/
(
double
)
AV_TIME_BASE
)
*
(
float
)
UINT16_MAX
/
(
s
->
duration
/
(
double
)
AV_TIME_BASE
);
if
(
frame_timestamp
>
((
s
->
start_time
/
(
double
)
AV_TIME_BASE
)
+
(
s
->
duration
/
(
double
)
AV_TIME_BASE
))
)
{
if
(
frame_timestamp
>
s
->
start_time
/
(
double
)
AV_TIME_BASE
+
s
->
duration
/
(
double
)
AV_TIME_BASE
)
{
s
->
fade_state
=
VF_FADE_DONE
;
}
}
...
...
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