Revision 5200b901 libavcodec/vorbis_enc.c

View differences:

libavcodec/vorbis_enc.c
542 542
    put_bits(&pb,  1, 1); // framing
543 543

  
544 544
    flush_put_bits(&pb);
545
    hlens[0] = (put_bits_count(&pb) + 7) / 8;
545
    hlens[0] = put_bits_count(&pb) >> 3;
546 546
    buffer_len -= hlens[0];
547 547
    p += hlens[0];
548 548

  
......
555 555
    put_bits(&pb,  1, 1); // framing
556 556

  
557 557
    flush_put_bits(&pb);
558
    hlens[1] = (put_bits_count(&pb) + 7) / 8;
558
    hlens[1] = put_bits_count(&pb) >> 3;
559 559
    buffer_len -= hlens[1];
560 560
    p += hlens[1];
561 561

  
......
628 628
    put_bits(&pb, 1, 1); // framing
629 629

  
630 630
    flush_put_bits(&pb);
631
    hlens[2] = (put_bits_count(&pb) + 7) / 8;
631
    hlens[2] = put_bits_count(&pb) >> 3;
632 632

  
633 633
    len = hlens[0] + hlens[1] + hlens[2];
634 634
    p = *out = av_mallocz(64 + len + len/255);
......
1023 1023
    avccontext->coded_frame->pts = venc->sample_count;
1024 1024
    venc->sample_count += avccontext->frame_size;
1025 1025
    flush_put_bits(&pb);
1026
    return (put_bits_count(&pb) + 7) / 8;
1026
    return put_bits_count(&pb) >> 3;
1027 1027
}
1028 1028

  
1029 1029

  

Also available in: Unified diff