[FFmpeg-cvslog] avcodec/aacenc: check input for NaN

Michael Niedermayer git at videolan.org
Sat Nov 8 23:55:51 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov  8 23:32:39 2014 +0100| [f9fa560597cf5e3e637d0f8e9bfd02cd0b91634c] | committer: Michael Niedermayer

avcodec/aacenc: check input for NaN

Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9fa560597cf5e3e637d0f8e9bfd02cd0b91634c
---

 libavcodec/aacenc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 464e4dc..be0c950 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;
     }



More information about the ffmpeg-cvslog mailing list