1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/dcaadpcm: check for av_malloc() failure

Fixes CID 1409915.
This commit is contained in:
foo86 2017-07-22 18:16:13 +03:00
parent f2c11b9337
commit 34fb84a97d

View File

@ -215,6 +215,9 @@ av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s)
return -1;
s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ);
if (!s->private_data)
return AVERROR(ENOMEM);
precalc(s->private_data);
return 0;
}