diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-05-02 22:23:48 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-04-12 01:23:43 +0200 |
commit | 91b27e49d66b98d894506e653cbd5272fd776108 (patch) | |
tree | 60b0b2dc36c5600dad2fab5b87ca8d0428e5dbc0 /ffplay.c | |
parent | 6873cf9bc8f3cb4959df51bdf79f079cee9a7006 (diff) | |
download | ffmpeg-91b27e49d66b98d894506e653cbd5272fd776108.tar.gz |
ffplay: compact expression in compute_mod()
Prefer "return X ? Y : Z" over "if (x) return Y; else return Z",
reduce line count.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -771,11 +771,7 @@ static void video_image_display(VideoState *is) static inline int compute_mod(int a, int b) { - a = a % b; - if (a >= 0) - return a; - else - return a + b; + return a < 0 ? a%b + b : a%b; } static void video_audio_display(VideoState *s) |