diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 15:22:16 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 15:33:40 +0400 |
commit | d53f4471308189cf825091bb5ed95843d59affcd (patch) | |
tree | ed2e7ecc72986809baac83abf609f8a33f7ae329 | |
parent | 17da2d9eee6bb3968522a2f1cdb54117260b6b7d (diff) |
swr: move if() block into the only branch where it can be true.
This should make the code a tiny tiny bit faster.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswresample/resample_template.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c index d519ec6b99..2ce97fa6ec 100644 --- a/libswresample/resample_template.c +++ b/libswresample/resample_template.c @@ -126,12 +126,13 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int } *consumed= FFMAX(sample_index, 0); index += FFMIN(sample_index, 0) << c->phase_shift; - } - if(compensation_distance){ - compensation_distance -= dst_index; - av_assert1(compensation_distance > 0); + if(compensation_distance){ + compensation_distance -= dst_index; + av_assert1(compensation_distance > 0); + } } + if(update_ctx){ c->frac= frac; c->index= index; |