diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-08 23:32:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-08 23:32:39 +0100 |
commit | f9fa560597cf5e3e637d0f8e9bfd02cd0b91634c (patch) | |
tree | 0a2a31fd5e3e24aea599e7dcfc3009d9572b759d /libavcodec/aacenc.c | |
parent | 41ad87ad8efe53af1422a0b3abde3d01e470447c (diff) | |
download | ffmpeg-f9fa560597cf5e3e637d0f8e9bfd02cd0b91634c.tar.gz |
avcodec/aacenc: check input for NaN
Fixes Ticket3762
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r-- | libavcodec/aacenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 464e4dcb0a..be0c950322 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -567,6 +567,10 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ics->group_len[w] = wi[ch].grouping[w]; apply_window_and_mdct(s, &cpe->ch[ch], overlap); + if (isnan(cpe->ch->coeffs[0])) { + av_log(avctx, AV_LOG_ERROR, "Input contains NaN\n"); + return AVERROR(EINVAL); + } } start_ch += chans; } |