Browse Source

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>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
f69f9b3876
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/aacenc.c

+ 1
- 2
libavcodec/aacenc.c View File

@@ -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]);
}


Loading…
Cancel
Save