Commit 4b6f2253 authored by Rob Sykes's avatar Rob Sykes Committed by Michael Niedermayer

swresample/soxr_resample: fix error handling

Fixes CID1257659
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d5a263f4
......@@ -76,8 +76,12 @@ static int process(
AudioData *src, int src_size, int *consumed){
size_t idone, odone;
soxr_error_t error = soxr_set_error((soxr_t)c, soxr_set_num_channels((soxr_t)c, src->ch_count));
error = soxr_process((soxr_t)c, src->ch, (size_t)src_size,
&idone, dst->ch, (size_t)dst_size, &odone);
if (!error)
error = soxr_process((soxr_t)c, src->ch, (size_t)src_size,
&idone, dst->ch, (size_t)dst_size, &odone);
else
idone = 0;
*consumed = (int)idone;
return error? -1 : odone;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment