summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-26 02:11:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-26 03:24:13 +0200
commitf69f9b387624bb5e3749e74c180bd092e0dcd20c (patch)
tree2cd06bf7955d44c726db049db922dc70bbcb94a7 /libavcodec/aacenc.c
parentcfb1c3c9f01a032c54e89880fb912cab2de2a735 (diff)
downloadffmpeg-streaming-f69f9b387624bb5e3749e74c180bd092e0dcd20c.zip
ffmpeg-streaming-f69f9b387624bb5e3749e74c180bd092e0dcd20c.tar.gz
aacenc: replace scale factor warning by assert
The code would crash after printing the warning Fixes CID717903, CID717904 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 9178bab..0a5aacf 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -385,8 +385,7 @@ static void encode_scale_factors(AVCodecContext *avctx, AACEncContext *s,
for (i = 0; i < sce->ics.max_sfb; i++) {
if (!sce->zeroes[w*16 + i]) {
diff = sce->sf_idx[w*16 + i] - off + SCALE_DIFF_ZERO;
- if (diff < 0 || diff > 120)
- av_log(avctx, AV_LOG_ERROR, "Scalefactor difference is too big to be coded\n");
+ av_assert0(diff >= 0 && diff <= 120);
off = sce->sf_idx[w*16 + i];
put_bits(&s->pb, ff_aac_scalefactor_bits[diff], ff_aac_scalefactor_code[diff]);
}
OpenPOWER on IntegriCloud