mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
swr: move dst_size == 0 handling outside DSP function.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
cc92372722
commit
ddb7b4435a
@ -297,10 +297,14 @@ static int swri_resample(ResampleContext *c,
|
|||||||
int delta_n = (delta_frac + c->dst_incr - 1) / c->dst_incr;
|
int delta_n = (delta_frac + c->dst_incr - 1) / c->dst_incr;
|
||||||
|
|
||||||
dst_size = FFMIN(dst_size, delta_n);
|
dst_size = FFMIN(dst_size, delta_n);
|
||||||
if (!c->linear) {
|
if (dst_size > 0) {
|
||||||
*consumed = c->dsp.resample_common[fn_idx](c, dst, src, dst_size, update_ctx);
|
if (!c->linear) {
|
||||||
|
*consumed = c->dsp.resample_common[fn_idx](c, dst, src, dst_size, update_ctx);
|
||||||
|
} else {
|
||||||
|
*consumed = c->dsp.resample_linear[fn_idx](c, dst, src, dst_size, update_ctx);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
*consumed = c->dsp.resample_linear[fn_idx](c, dst, src, dst_size, update_ctx);
|
*consumed = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user