Revision daf4cd9a

View differences:

libavcodec/mpegaudiodec.c
1686 1686
        linbits = mpa_huff_data[k][1];
1687 1687
        vlc = &huff_vlc[l];
1688 1688

  
1689
        if(!l){
1690
            memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid)*j);
1691
            s_index += 2*j;
1692
            continue;
1693
        }
1694

  
1689 1695
        /* read huffcode and compute each couple */
1690 1696
        for(;j>0;j--) {
1691 1697
            if (get_bits_count(&s->gb) >= end_pos)
1692 1698
                break;
1693
            if (l) {
1694
                y = get_vlc2(&s->gb, vlc->table, 8, 3);
1695
                x = y >> 4;
1696
                y = y & 0x0f;
1697
            } else {
1698
                x = 0;
1699
                y = 0;
1700
            }
1699
            y = get_vlc2(&s->gb, vlc->table, 8, 3);
1700
            x = y >> 4;
1701
            y = y & 0x0f;
1702

  
1701 1703
            dprintf("region=%d n=%d x=%d y=%d exp=%d\n",
1702 1704
                    i, g->region_size[i] - j, x, y, exponents[s_index]);
1703 1705
            if (x) {
......
1756 1758
            g->sb_hybrid[s_index++] = v;
1757 1759
        }
1758 1760
    }
1759
    while (s_index < 576)
1760
        g->sb_hybrid[s_index++] = 0;
1761
    memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid)*(576 - s_index));
1761 1762
    return 0;
1762 1763
}
1763 1764

  

Also available in: Unified diff