Browse Source

avcodec/aacenc: check input for NaN

Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
f9fa560597
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/aacenc.c

+ 4
- 0
libavcodec/aacenc.c View File

@@ -567,6 +567,10 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
ics->group_len[w] = wi[ch].grouping[w]; ics->group_len[w] = wi[ch].grouping[w];


apply_window_and_mdct(s, &cpe->ch[ch], overlap); 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; start_ch += chans;
} }


Loading…
Cancel
Save