mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-04 05:57:49 +02:00
avfilter/af_mcompand: check allocation results
Fixes the only remaining part of ticket #8931. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
28c83584e8
commit
46f3ae8f67
@ -384,6 +384,9 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
s->bands[i].attack_rate = av_calloc(outlink->channels, sizeof(double));
|
s->bands[i].attack_rate = av_calloc(outlink->channels, sizeof(double));
|
||||||
s->bands[i].decay_rate = av_calloc(outlink->channels, sizeof(double));
|
s->bands[i].decay_rate = av_calloc(outlink->channels, sizeof(double));
|
||||||
s->bands[i].volume = av_calloc(outlink->channels, sizeof(double));
|
s->bands[i].volume = av_calloc(outlink->channels, sizeof(double));
|
||||||
|
if (!s->bands[i].attack_rate || !s->bands[i].decay_rate || !s->bands[i].volume)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
for (k = 0; k < FFMIN(nb_attacks / 2, outlink->channels); k++) {
|
for (k = 0; k < FFMIN(nb_attacks / 2, outlink->channels); k++) {
|
||||||
char *tstr3 = av_strtok(p3, ",", &saveptr3);
|
char *tstr3 = av_strtok(p3, ",", &saveptr3);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user