summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudioenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mpegaudioenc.c')
-rw-r--r--libavcodec/mpegaudioenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index d2b1e70900..455c4b2662 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -181,6 +181,8 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
}
avctx->coded_frame= avcodec_alloc_frame();
+ if (!avctx->coded_frame)
+ return AVERROR(ENOMEM);
return 0;
}