Revision 8a9ee4b1 libavcodec/aacsbr.c

View differences:

libavcodec/aacsbr.c
628 628
        if (ch_data->bs_num_env[1] == 1)
629 629
            ch_data->bs_amp_res = 0;
630 630

  
631
        ch_data->bs_pointer = 0;
632

  
631 633
        ch_data->bs_freq_res[1] = get_bits1(gb);
632 634
        for (i = 1; i < ch_data->bs_num_env[1]; i++)
633 635
            ch_data->bs_freq_res[i + 1] = ch_data->bs_freq_res[1];
......
675 677
        break;
676 678
    }
677 679

  
680
    if (ch_data->bs_pointer > ch_data->bs_num_env[1] + 1) {
681
        av_log(ac->avccontext, AV_LOG_ERROR,
682
               "Invalid bitstream, bs_pointer points to a middle noise border outside the time borders table: %d\n",
683
               ch_data->bs_pointer);
684
        return -1;
685
    }
678 686
    if (ch_data->bs_frame_class == FIXFIX && ch_data->bs_num_env[1] > 4) {
679 687
        av_log(ac->avccontext, AV_LOG_ERROR,
680 688
               "Invalid bitstream, too many SBR envelopes in FIXFIX type SBR frame: %d\n",

Also available in: Unified diff