aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-13 20:53:46 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-27 07:20:57 +0100
commit634c4ce8b08a5f7eaf1a31be42bbfd6b59ff4bf0 (patch)
treeaabc6a67d0aa628e5b9e0df0772fb289144d9a21
parenta080af9b8c89ab74320a9377da5827e5b532685d (diff)
downloadffmpeg-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.c4
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;