mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavfi: properly signal out-of-memory error in ff_filter_samples
Found with a clang-scan report on http://fate.libav.org/csa/
This commit is contained in:
parent
8b8750e061
commit
800750417f
@ -172,6 +172,10 @@ int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
|
||||
|
||||
buf_out = ff_default_get_audio_buffer(link, dst->min_perms,
|
||||
samplesref->audio->nb_samples);
|
||||
if (!buf_out) {
|
||||
avfilter_unref_buffer(samplesref);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
buf_out->pts = samplesref->pts;
|
||||
buf_out->audio->sample_rate = samplesref->audio->sample_rate;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user