diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 12:22:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 12:33:40 +0100 |
commit | d53f4471308189cf825091bb5ed95843d59affcd (patch) | |
tree | ed2e7ecc72986809baac83abf609f8a33f7ae329 /libswresample/resample_template.c | |
parent | 17da2d9eee6bb3968522a2f1cdb54117260b6b7d (diff) | |
download | ffmpeg-d53f4471308189cf825091bb5ed95843d59affcd.tar.gz |
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>
Diffstat (limited to 'libswresample/resample_template.c')
-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; |