[FFmpeg-cvslog] avfilter/fade: remove a bunch of useless parenthesis.

Clément Bœsch git at videolan.org
Sun Nov 10 19:17:48 CET 2013


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Nov 10 19:15:19 2013 +0100| [981128c2c184b598d751eaba83515a327fbefb1b] | committer: Clément Bœsch

avfilter/fade: remove a bunch of useless parenthesis.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=981128c2c184b598d751eaba83515a327fbefb1b
---

 libavfilter/vf_fade.c |   16 ++++++++--------
 1 file 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;
             }
         }



More information about the ffmpeg-cvslog mailing list