Revision a8380f44 libavcodec/common.c

View differences:

libavcodec/common.c
48 48
{
49 49
    s->buf = buffer;
50 50
    s->buf_end = s->buf + buffer_size;
51
    s->data_out_size = 0;
52 51
#ifdef ALT_BITSTREAM_WRITER
53 52
    s->index=0;
54 53
    ((uint32_t*)(s->buf))[0]=0;
......
63 62
#ifdef CONFIG_ENCODERS
64 63

  
65 64
/* return the number of bits output */
66
int64_t get_bit_count(PutBitContext *s)
65
int get_bit_count(PutBitContext *s)
67 66
{
68 67
#ifdef ALT_BITSTREAM_WRITER
69
    return s->data_out_size * 8 + s->index;
68
    return s->index;
70 69
#else
71
    return (s->buf_ptr - s->buf + s->data_out_size) * 8 + 32 - (int64_t)s->bit_left;
70
    return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left;
72 71
#endif
73 72
}
74 73

  

Also available in: Unified diff