Revision 0e9b0643

View differences:

libavcodec/ac3enc.c
1571 1571
 */
1572 1572
static void output_frame_end(AC3EncodeContext *s)
1573 1573
{
1574
    int frame_size, frame_size_58, pad_bytes, crc1, crc2, crc_inv;
1574
    int frame_size_58, pad_bytes, crc1, crc2, crc_inv;
1575 1575
    uint8_t *frame;
1576 1576

  
1577
    frame_size    = s->frame_size;
1578
    frame_size_58 = ((frame_size >> 2) + (frame_size >> 4)) << 1;
1577
    frame_size_58 = ((s->frame_size >> 2) + (s->frame_size >> 4)) << 1;
1579 1578

  
1580 1579
    /* pad the remainder of the frame with zeros */
1581 1580
    flush_put_bits(&s->pb);
......
1596 1595
    /* compute crc2 */
1597 1596
    crc2 = av_bswap16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
1598 1597
                             frame + frame_size_58,
1599
                             frame_size - frame_size_58 - 2));
1600
    AV_WB16(frame + frame_size - 2, crc2);
1598
                             s->frame_size - frame_size_58 - 2));
1599
    AV_WB16(frame + s->frame_size - 2, crc2);
1601 1600
}
1602 1601

  
1603 1602

  

Also available in: Unified diff