Revision 17ee8f66 libavformat/aviobuf.c

View differences:

libavformat/aviobuf.c
113 113
        flush_buffer(s);
114 114
}
115 115

  
116
void put_nbyte(ByteIOContext *s, int b, int count)
117
{
118
    while (count > 0) {
119
        int len = FFMIN(s->buf_end - s->buf_ptr, count);
120
        memset(s->buf_ptr, b, len);
121
        s->buf_ptr += len;
122

  
123
        if (s->buf_ptr >= s->buf_end)
124
            flush_buffer(s);
125

  
126
        count -= len;
127
    }
128
}
129

  
116 130
void put_buffer(ByteIOContext *s, const unsigned char *buf, int size)
117 131
{
118 132
    while (size > 0) {

Also available in: Unified diff