summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2013-11-10 19:15:19 +0100
committerClément Bœsch <u@pkh.me>2013-11-10 19:15:48 +0100
commit981128c2c184b598d751eaba83515a327fbefb1b (patch)
tree38ae425ad593c3b84c0726bcf8834340e2d6b3d2 /libavfilter
parent461e810cfce95092a0e4c346d8ca44f8d2494012 (diff)
downloadffmpeg-streaming-981128c2c184b598d751eaba83515a327fbefb1b.zip
ffmpeg-streaming-981128c2c184b598d751eaba83515a327fbefb1b.tar.gz
avfilter/fade: remove a bunch of useless parenthesis.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_fade.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 0422f1c..387c128 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -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;
}
}
OpenPOWER on IntegriCloud