mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00: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,
|
buf_out = ff_default_get_audio_buffer(link, dst->min_perms,
|
||||||
samplesref->audio->nb_samples);
|
samplesref->audio->nb_samples);
|
||||||
|
if (!buf_out) {
|
||||||
|
avfilter_unref_buffer(samplesref);
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
buf_out->pts = samplesref->pts;
|
buf_out->pts = samplesref->pts;
|
||||||
buf_out->audio->sample_rate = samplesref->audio->sample_rate;
|
buf_out->audio->sample_rate = samplesref->audio->sample_rate;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user