~ubuntu-branches/ubuntu/raring/libav/raring-proposed

« back to all changes in this revision

Viewing changes to libavcodec/flacenc.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-24 08:05:12 UTC
  • mfrom: (1.2.14)
  • Revision ID: package-import@ubuntu.com-20130124080512-e9c1ryhp81pw587k
Tags: 6:0.8.5-0ubuntu1
* Update to 0.8.5 to fix multiple security issues. (LP: #1104019)
  - CVE-2012-2783
  - CVE-2012-2791
  - CVE-2012-2797
  - CVE-2012-2798
  - CVE-2012-2801
  - CVE-2012-2802
  - CVE-2012-2803
  - CVE-2012-2804
  - CVE-2012-5144

Show diffs side-by-side

added added

removed removed

Lines of Context:
915
915
        omethod == ORDER_METHOD_8LEVEL) {
916
916
        int levels = 1 << omethod;
917
917
        uint32_t bits[1 << ORDER_METHOD_8LEVEL];
918
 
        int order;
 
918
        int order       = -1;
919
919
        int opt_index   = levels-1;
920
920
        opt_order       = max_order-1;
921
921
        bits[opt_index] = UINT32_MAX;
922
922
        for (i = levels-1; i >= 0; i--) {
 
923
            int last_order = order;
923
924
            order = min_order + (((max_order-min_order+1) * (i+1)) / levels)-1;
924
 
            if (order < 0)
925
 
                order = 0;
 
925
            order = av_clip(order, min_order - 1, max_order - 1);
 
926
            if (order == last_order)
 
927
                continue;
926
928
            encode_residual_lpc(res, smp, n, order+1, coefs[order], shift[order]);
927
929
            bits[i] = find_subframe_rice_params(s, sub, order+1);
928
930
            if (bits[i] < bits[opt_index]) {