mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
af_aresample: check ff_get_audio_buffer() failure
Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ed017ab945
commit
014058abea
@ -179,6 +179,9 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref)
|
||||
AVFilterBufferRef *outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out);
|
||||
int ret;
|
||||
|
||||
if(!outsamplesref)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
|
||||
outsamplesref->format = outlink->format;
|
||||
outsamplesref->audio->channel_layout = outlink->channel_layout;
|
||||
|
Loading…
Reference in New Issue
Block a user