mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
aresample: check return code of swr_convert()
Issue found by comparing af_resample.c and af_aresample.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a99a3b1bb3
commit
b3e1b95afa
@ -169,6 +169,11 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
|
||||
|
||||
n_out = swr_convert(aresample->swr, outsamplesref->data, n_out,
|
||||
(void *)insamplesref->data, n_in);
|
||||
if (n_out <= 0) {
|
||||
avfilter_unref_buffer(outsamplesref);
|
||||
avfilter_unref_buffer(insamplesref);
|
||||
return;
|
||||
}
|
||||
|
||||
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
|
||||
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
||||
|
Loading…
Reference in New Issue
Block a user