diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-13 20:53:46 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-27 07:20:57 +0100 |
commit | 634c4ce8b08a5f7eaf1a31be42bbfd6b59ff4bf0 (patch) | |
tree | aabc6a67d0aa628e5b9e0df0772fb289144d9a21 | |
parent | a080af9b8c89ab74320a9377da5827e5b532685d (diff) | |
download | ffmpeg-634c4ce8b08a5f7eaf1a31be42bbfd6b59ff4bf0.tar.gz |
avcodec/atrac1: Check allocation of AVFloatDSPContext
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit e75ccc81234a22eee90e2a31808639e754b97cd1)
-rw-r--r-- | libavcodec/atrac1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index a8c8c91bcc..9ecd49273d 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -362,6 +362,10 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) ff_atrac_generate_tables(); q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT); + if (!q->fdsp) { + atrac1_decode_end(avctx); + return AVERROR(ENOMEM); + } q->bands[0] = q->low; q->bands[1] = q->mid; |